Products | Versions |
---|---|
TIBCO Collaborative Information Manager | - |
Not Applicable | - |
Resolution:
How to pass additional parameters to SpawnWorkflow activity
Environment:
TIBCO Product name and version: TIBCO Collaborative Information Manager 7.2.1
Operating System(s): All Operating Systems
Symptoms:
None.
Cause:
None.
Resolution:
Here are the steps to be followed:
Pass the parameter as an "in" parameter to the SpawnWorkflow activity. In the example below, an "in" parameter called OutputFormat is passed with constant value "MineOutputFormat". Snippet of the SpawnWorkflow activity:
<Activity Name="SpawnWorkflow">
<Action>SpawnWorkflow</Action>
<Description lang="en">Spawn individual WorkFlow for each record bundle</Description>
<Execution>ASYNCHR</Execution>
<Parameter direction="in" type="string" eval="constant" name="eventState">SPAWNWORKFLOW</Parameter>
<Parameter direction="in" name="InDocument" type="document" eval="variable">inDoc</Parameter>
<Parameter direction="in" name="InRecordList" type="recordlist" eval="variable">workRecordList</Parameter>
<Parameter direction="in" name="ProcessID" type="string" eval="constant">standard/workflow/wfin26catsourceimportv2</Parameter>
<Parameter direction="in" name="DocumentTemplate" type="string" eval="constant">standard/template/tm26catimportv1.xml</Parameter>
<Parameter direction="in" eval="constant" name="Form" type="string">standard/forms/fm26importtemplatev1.xml</Parameter>
<!-- <Parameter direction="in" name="OutputFormat" type="string" eval="constant">MineOutputFormat</Parameter> -->
<Parameter direction="in" name="DefaultDomain" type="string" eval="constant">MartQuestNet</Parameter>
<Parameter direction="in" name="SenderCredential" eval="xpath" type="long" source="/Message/Header/MessageHeader[@origin='Receiver']/Member/PartyID/DBID/text()">inDoc</Parameter>
<Parameter direction="in" name="ChannelCredential" eval="xpath" type="long" source="/Message/Header/MessageHeader[@origin='Receiver']/Member/PartyID/DBID/text()">inDoc</Parameter>
<Parameter direction="in" name="TradingPartnerCredential" eval="xpath" type="long" source="/Message/Header/MessageHeader[@origin='Receiver']/Member/PartyID/DBID/text()">inDoc</Parameter>
<Parameter direction="in" name="MasterCatalog" eval="xpath" type="long" source="/Message/Body/Document/BusinessDocument/CatalogAction/CatalogActionHeader/MasterCatalog/RevisionID/DBID/text()">inDoc</Parameter>
<Parameter direction="in" name="OutputFormat" eval="xpath" type="long" source="/Message/Body/Document/BusinessDocument/CatalogAction/CatalogActionHeader/MasterCatalog/RevisionID/DBID/text()">inDoc</Parameter>
</Activity>
If you notice, an input parameter called OutputFormat is passed to the SpawnWorkflow activity. In the form fm26importtemplatev1, have the following to set the Value under OutputFormat based on the value set as in parameter in the SpawnWorkflow activity.
<Field>
<ID>OutputFormat</ID>
<InputFrom>/Message/Body/Document/BusinessDocument/CatalogAction/CatalogActionHeader/Extension[@name='OutputFormat']/Value/text()</InputFrom>
<OutputTo>(//Form/Field/ID[text()='OutputFormat'])/following-sibling::Value</OutputTo>
<Value></Value>
</Field>
If you open the document passed to the spawned workflow, the OutputFormat element will have a Value set under it.
Attachments:
wfin26catsourcev4.xml
fm26importtemplatev1.xml
None
References:
None