ItemType must has relationship of target Workflow Map, otherwise server will return error after executing AML.
After created Workflow Process, source item should be linked with it. Below syntax will create relationship for them:
Instantiate Workflow
Below syntax will create a new Workflow Process and server will return a new ID for it:
<AML>
<Item type="Source ItemType" id="Source Item ID" action="instantiateWorkflow">
<WorkflowMap>Workflow Map ID</WorkflowMap>
</Item>
</AML>
After created Workflow Process, source item should be linked with it. Below syntax will create relationship for them:
<AML>
<Item type="Workflow" action="add">
<source_type>Source ItemType</source_type>
<source_id>Source Item ID</source_id>
<related_id>Workflow Process ID</related_id>
</Item>
</AML>
Start Workflow
Above steps only "create" but not "start", the new Workflow Process need to be launched manually with below syntax:
<AML>
<Item type="Workflow Process" id="Workflow Process ID" action="startWorkflow" />
</AML>
Comments
Post a Comment