Fire up your applications with Jazz
RSS
Jazz CMS Wiki

About Us

CMS CMS Administration GUI Jazz Jazz Administration Jazz Web Parts Library misc Roles Solutions Training Web Parts Web Service Website Design Website Procedures Wiki conventions WordML Workflow Administration

Quick Search
»
Advanced Search »

Web Service: Web Methods for Create, Save and Execute

RSS
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:
  • the Nexus Key received during login
  • the name of the workflow class

<?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:
  • the Nexus Key received during login
  • the name of the workflow class
  • the name of the workspace where the workflow is to be added

<?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:
  • the Nexus Key received during login
  • an xml description of the workflow with properties names and values
    • xml for the workflowString
      • The xml description must include a Guid. If the Guid is not included, then the Nexus creates a new workflow and populates it with the requested values.
      • Only include the property values that should be changed.
      • The Nexus checks if the requested value change is the same as what is in the Nexus. If it is the same, then the property is not updated.
      • The Jetfire Nexus supports concurrency. It is recommended that you retrieve the workflow from the Nexus, edit it and then send the save request it to the Nexus via the Web Service.

<?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:
  • the Nexus Key received during login
  • an xml description of the workflow containing the called method name and optional parameter properties
    • xml for the workflowString
      • The xml description must include a Guid. If the Guid is not included, then the Nexus creates a new workflow and populates it with the requested values.
      • The Jetfire Nexus supports concurrency. It is recommended that you retrieve the workflow from the Nexus, edit it and then send the command request to the Nexus via the Web Service.

<?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>

  • request with parameters. The parameters are assumed to use map into workflow properties to simplify matching method signatures. The Parameter name must be the name of the Workflow property.

<?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.

http://www.wiebeworks.com - Wiki version 3.0.4.560.