Note | ||
---|---|---|
| ||
WIP! Restricted access. |
Let's take a simple scenario where a BPMN process reads some content (text message) that is stored in the product registry and passes the message to a target variable.
Tip | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Before you begin,
|
Let's get started! This tutorial includes the following sections:
...
- Create a text file named TestBPMN.texttxt with the following text content: 'Sample content stored in the registry'
- Create a registry resource project:
- Open WSO2 Integration Studio and click Miscellaneous → Create New Registry Project in the Getting Started view as shown below.
- In the dialog that opens, enter a name for the registry project.
- Click Finish and see that the project is now listed in the project explorer.
- Open WSO2 Integration Studio and click Miscellaneous → Create New Registry Project in the Getting Started view as shown below.
- Add the TestBPMN.texttxt file to the conf directory of the product registry:
- Right-click the registry resource project in the left navigation panel, click New, and then click Registry Resource. This will open the New Registry Resource window.
- Select the Import from file system option as shown below and click Next.
- Click Browse file and select the TestBPMN.texttxt file that you created.
- In the Registry field, select conf as the registry directory.
- In the Registry path to deploy field, set repository/ as the path.
- In the Save Resource in field, select the existing registry resource project.
- Click Finish.
...
Now, let's configure the READ task to read the content from the registry resource (TestBPMN resource) and write it to a specific target.
Select the Read READ task in the diagram, go to the Properties/Main Config tab, and enter the following configurations:
Resource | Origin | Target | Type |
---|---|---|---|
conf:/repository/TestBPMN.txt | REGISTRY | testing | string |
The descriptions of the properties are as follows:
...
Configuring the User Task
Select the User task , go and apply property values:
- Go to the Properties/Main config tab and enter admin in the Assignee field.
Go to the Properties/Form tab and enter the following configurations:
Use the following values as Form properties:
id Name Type Expression
...
Required Readable Writeable variable testing string ${testing}
...
false true false
Deploying the artifacts
Follow the steps below to deploy BPMN artifacts.
...
the
...
artifacts
...
...
Follow the steps below to deploy the registry artifacts.
- See the instructions on packaging the registry resource in Create a composite applicaition project (C-App project) to package the registry resource:
- Open the Getting Started view and click Miscellaneous → Create New Composite Application .
- In the New Composite Application Project dialog that opens, select the registry project and click Finish.
- In the Composite Application Project POM Editor that opens, under Dependencies, set the server role of the registry resource to Business Process Server as shown below.
- Open the Getting Started view and click Miscellaneous → Create New Composite Application .
- To create the Export a CAR file , do one of with the followingregistry artifacts:
- Be sure the the registry resource is selected as a dependency in th C-App project.
- Right-click the C-App project and select Export Composite Application Project from the pop-up menu. Alternatively, open the
pom.xml
file in the Composite Application Project POM Editor and click the button for creating an archive in the upper-right corner. - Specify a location to save the CAR file.
You have now exported the registry resource into a single CAR file.
- To deploy Deploy the CAR file in the Business Process server of WSO2 EI:
- Start the Business Process profile.
- Open the management console of the Business Process profile.
- Go to Main → Carbon Applications → Add and select the CAR file.
Follow the steps below to deploy BPMN artifacts.
- See the instructions on creating the deployable archive for the BPMN artifacts.
- See the instructions on deploying BPMN artifacts.
Testing the output
Follow the steps below to test the output.
- Log into the BPMN-explorer at https://localhost:9445/bpmn-explorer using
admin
for both the username and password. - Click PROCESSES in the top menu, and click the Start option of the Read Task process.
- Go to MONITORING → ADVANCED FILTERING. Then select the ReadTask process as the Process Definition ID and click Search to find the running process instance.
- Select your process instance to see details. Click the Variables tab and see that the content that you stored in the registry ('Sample content stored in the registry') has been written by the user task.