Web Service: Web Methods for Create, Save and Execute

Modified on 2011/10/11 19:20 by Charles — Categorized as: Web Service


Create, Save and Execute Web Methods for Jetfire Workflows

(return to Jetfire Web Service)

The Jetfire Web Service can be used to create, save and execute methods for a workflow.


Create Workflow

The create method is used to create a workflow.

Prerequisites: Must be logged in.
Send: Parameters for the Create Workflow method include:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CreateWorkflow xmlns="http://Jetfire.ca/WebService">
      <nexusKey>string</nexusKey>
      <workflowName>string</workflowName>
    </CreateWorkflow>
  </soap:Body>
</soap:Envelope>

Receive: an xml string definition of the new workflow is returned, showing the default values populated.
Note: if the property is a workflow, then a Guid attribute is present.
Note: the example show no methods, because there are no public methods that can be accessed by this user.

Success Response:
<?xml version='1.0' encoding='utf-8' ?>
<Workflows xmlns="http://schemas.Jetfire.ca/Workflows">
	<Workflow>
		<Properties>
			<Property Name="Subject" Value="OAWA Region" Label="Region" ToolTip="" Display="True" FormElement="TextBox" ClassName="string" Position="1"/>
			<Property Name="Club" Value="OawaCommonClub" Label="Province" ToolTip="" Display="True" FormElement="DropDownList" ClassName="OawaCommonClub" Position="2" Guid="6571c8d4-fe5a-4441-bf92-e8d99a5f10d0" />
			<Property Name="PrimaryContact" Value="Select OAWA Contact" Label="Primary Contact" ToolTip="" Display="True" FormElement="DropDownList" ClassName="OawaContact" Position="3" Guid="40918872-ee10-4263-bb96-19d8a69230b9" />
			<Property Name="SecondaryContact" Value="Select OAWA Contact" Label="Secondary Contact" ToolTip="" Display="True" FormElement="DropDownList" ClassName="OawaContact" Position="4" Guid="40918872-ee10-4263-bb96-19d8a69230b9" />
			<Property Name="Notes" Value="" Label="Notes" ToolTip="" Display="True" FormElement="Collection" ClassName="List" Position="7" Guid="216a9fcb-ba09-440c-b254-b883b709423c" />
			<Property Name="Guid" Value="0c3afcfe-488f-4cde-89ed-7935953e094e" Label="Guid" ToolTip="Guid" Display="False" FormElement="Label" ClassName="plainString" Position="1000"/>
			<Property Name="WorkflowClass" Value="OawaRegion" Label="WorkflowClass" ToolTip="WorkflowClass" Display="False" FormElement="Label" ClassName="plainString" Position="1000"/>
			<Property Name="CurrentState" Value="Active" Label="CurrentState" ToolTip="CurrentState" Display="False" FormElement="Label" ClassName="plainString" Position="1000"/>
		</Properties>
		<Methods></Methods>
	</Workflow>
</Workflows>

Failure Response:
<?xml version='1.0' encoding='utf-8' ?>
<Errors xmlns="http://schemas.Jetfire.ca/Errors">
  <Error Name="Error 1" Value="The New Workflow operation failed."/>
</Errors>

Create Workflow in Workspace

The create method is used to create a workflow.

Prerequisites: Must be logged in.
Send: Parameters for the Create Workflow method include:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CreateWorkflowInWorkspace xmlns="http://Jetfire.ca/WebService">
      <nexusKey>string</nexusKey>
      <workflowName>string</workflowName>
      <workspace>string</workspace>
    </CreateWorkflowInWorkspace>
  </soap:Body>
</soap:Envelope>

Receive: The responses are the same as the CreateWorkflow responses. The difference is that the workflow is created in the requested workspace vs the public workspace.

Save Workflow

The Save method is used to save property values for a workflow.

Prerequsites: Must be logged in
Send: Parameters for the Save Workflow method include:
<?xml version='1.0' encoding='utf-8' ?>
<Workflows xmlns="http://schemas.Jetfire.ca/Workflows">
	<Workflow>
		<Properties>
			<Property Name="Subject" Value="My favourite Region" />
			<Property Name="Guid" Value="0c3afcfe-488f-4cde-89ed-7935953e094e" />
		</Properties>
	</Workflow>
</Workflows>

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SaveWorkflow xmlns="http://Jetfire.ca/WebService">
      <nexusKey>string</nexusKey>
      <workflowString>string</workflowString>
    </SaveWorkflow>
  </soap:Body>
</soap:Envelope>

Receive: The responses are the same as the CreateWorkflow responses. If all values are updated, then the returned workflow confirms the values saved in the Nexus. If there is a error during save, then the response shows the errors encountered.

Execute Command

The execute method is used to call a command for a workflow. The method call may include optional parameters.

Prerequisites: Must be logged in.
Send: Parameters for the Execute method include:
<?xml version='1.0' encoding='utf-8' ?>
<Workflows xmlns="http://schemas.Jetfire.ca/Workflows">
	<Workflow>
		<Properties>
			<Property Name="Guid" Value="0c3afcfe-488f-4cde-89ed-7935953e094e" />
		</Properties>
		<Methods>
			<Method Name="Delete" Value="Delete" />
		</Methods>
	</Workflow>
</Workflows>


<?xml version='1.0' encoding='utf-8' ?>
<Workflows xmlns="http://schemas.Jetfire.ca/Workflows">
	<Workflow>
		<Properties>
			<Property Name="Guid" Value="0c3afcfe-488f-4cde-89ed-7935953e094e" />
		</Properties>
		<Parameters>
			<Parameter Name="Subject" Value="the requested subject" />
		</Parameters>
		<Methods>
			<Method Name="Delete" Value="Delete" />
		</Methods>
	</Workflow>
</Workflows>

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ExecuteCommand xmlns="http://Jetfire.ca/WebService">
      <nexusKey>string</nexusKey>
      <workflowString>string</workflowString>
    </ExecuteCommand>
  </soap:Body>
</soap:Envelope>

Receive: The responses are the same as the CreateWorkflow responses. If the requested command is successful, then the returned workflow confirms the values saved in the Nexus. If there is a error during executing the command, then the response shows the errors encountered.