Action – instantiateWorkflow - erdomke/Innovator.Client GitHub Wiki

AML Query

<!-- SOAP_ACTION = InstantiateWorkflow, ApplyAML, or ApplyItem -->
<AML>
  <Item type="{Type}" id="{id}" action="instantiateWorkflow">
    <WorkflowMap>{Workflow Map Id}</WorkflowMap>
  </Item>
</AML>

Example (Input):

<AML>
  <Item type="Part Request" 
    id="D5B65A35ADC94D4B86D82BDC66C30310" 
    action="instantiateWorkflow">
    <WorkflowMap>E65A898015554C5C9314D90E94ECE639</WorkflowMap>
  </Item>
</AML>

if you wish to completely start a workflow process using AML, you will need to followup the instantiateWorkflow command with the 'add' of a workflow item to link the new process to using:

<Item type="Workflow" action="add">
  <related_id>{New Workflow Process ID}</related_id>
  <source_id>{Parent Item ID}</source_id>
  <source_type>{Parent ItemType ID}</source_type>
</Item>

Now the workflow process is instantiated, and linked, but not yet started. To start the workflow and place it in the inbasket, you will also need to start the workflow ➡️.

Example (Result):

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <Result>
      <Item type="Workflow Process" id="B0FE0B1B704C45C5A3EF0ACEC68E728D" wf_is_default="1" />
    </Result>
    <Message>
      <event name="ids_modified" value="B0FE0B1B704C45C5A3EF0ACEC68E728D|88C4ECDE34374DEBADAB5210D1E08BA3|E92B0D9EB6FC4CB7BD912D67F23E0A29|ED607EB4AF3849748D09AC946256CB8D|0A92959EB55541199E802B818E4F587B|E146F60AE6194C7DBFB13A77780A13FA|BDE82FDF9FE2428A835CBD40D127557E|7AF60F4794F742ECA80E42AF0B1893FF" />
    </Message>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
⚠️ **GitHub.com Fallback** ⚠️