Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Stardust/Knowledge Base/Web Service API/Starting Processes with Document Attachments
This example demonstrates how to start a process instance with document attachments using the WS-API.
Create a simple process with ID: "TestProcess1"
Enable Process Attachments
One manual activity to show the data submitted on process start and to allow checking if the document is added as process attachment.
A manual trigger is not required to allow process starts via the WS API.
In Stardust version > 5.2 WS Security (optional) is supported. Hence the WSDL URLs for http basic authentication have changed. The new URLs are:
http://localhost:8080/project/services/soap/WorkflowServiceHttpBasicAuthSsl?wsdl
http://localhost:8080/project/services/soap/AdministrationServiceHttpBasicAuthSsl?wsdl
http://localhost:8080/project/services/soap/DocumentManagementServiceHttpBasicAuthSsl?wsdl
http://localhost:8080/project/services/soap/UserServiceHttpBasicAuthSsl?wsdl
http://localhost:8080/project/services/soap/QueryServiceHttpBasicAuthSsl?wsdl
After starting the server, it should be possible to import the WSDL into SOAP UI or to read it with another client
(http://localhost:8080/project/services/soap/WorkflowServiceHttpBasicAuthSsl?wsdl)
- Start an instance of the example process TestProcess1
- Submit a value for the process data TestStringData
- Attach a text document to the process
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:api="http://infinity.com/bpm/ws/v2009a/api">
<soapenv:Header/>
<soapenv:Body>
<api:startProcess>
<!--type: string-->
<api:processId>TestProcess1</api:processId>
<api:parameters>
<!--Zero or more repetitions:-->
<api:parameter>
<!--type: string-->
<api:name>TestStringData</api:name>
<api:primitive>My test data</api:primitive>
</api:parameter>
</api:parameters>
<!--type: boolean-->
<api:startSynchronously>true</api:startSynchronously>
<!--Optional:-->
<api:attachments>
<!--Zero or more repetitions:-->
<api:inputDocument>
<api:documentInfo>
<api:name>mydoc.txt</api:name>
<api:type>api:Document</api:type>
<api:description>My document description</api:description>
<api:contentType>text/plain</api:contentType>
<!--Optional:-->
<api:owner>motu</api:owner>
<api:dateCreated>20010-07-15E13:40:00</api:dateCreated>
<api:dateLastModified>20010-07-15E14:00:00</api:dateLastModified>
<api:metaDataType></api:metaDataType>
</api:documentInfo>
<!--Optional:-->
<api:content>VGhpcyBpcyBhIHRlc3Q=</api:content>
<!--Optional:-->
<api:versionInfo>
<api:label></api:label>
</api:versionInfo>
<api:targetFolder></api:targetFolder>
</api:inputDocument>
</api:attachments>
</api:startProcess>
</soapenv:Body>
</soapenv:Envelope>
The credentials to be used for the login to the Stardust service (http basic authentication, motu/motu) can be changed in the properties of the request.
After a successful execution of the example startProcess request on IWorkflowServiceSoapBinding, a new work list entry for the Administrator should exist:
The activity panel which opens for this work item should show
- The submitted process data
- The document attached to the process