This project has moved. For the latest updates, please go here.

Instantiate a Workflow

Soap Action: ApplyItem or ApplyAML

To execute this action, you can use any of the following APIs:

  • Aras.IOM.Innovator.ApplyAML()
  • Aras.IOM.Item.Apply()
  • Aras.IOM.IServerConnection.CallAction()

Input Structure:

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

 

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>

Last edited Feb 21, 2012 at 7:01 PM by erdomke, version 3

Comments

kentonvk Oct 22, 2013 at 9:02 PM 
This task is simpler using the IOM (although the necessary functions are slated for removal), but 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 use the SOAP action of StartWorkflow for this.

<Item type="Workflow Process" action="startWorkflow" id="{Workflow Process ID}">
</Item>

I haven't tried all these steps, but I think these are required to perform what you are looking for.

arasplm07 Oct 2, 2013 at 11:18 PM 
I have query regarding instantiate Workflow.

I am using instantiate workflow as given but it doesn't show the assigned activities in MyInBasket.

The workflow processes and activities are getting created but all of them are in pending state even an activity with is_start = '1'.

Please suggest me how to solve this.