This lab will introduce us to support of various different application development lifecycles using both BPM Studio and BPM Composer. As we have already completed labs which went into detail on modeling and implementation we will be creating an incredibly simple HelloWorld process. We will begin the lab assuming a Business Analyst persona. We will use BPM Composer to create a Process Blueprint, an abstract model which defines our flow and activities. This blueprint is stored in our Metadata Services Repository and shared with a Process Developer, the developer will add services to the project and convert it to a Process Template. Again, the template will be shared with our Process Owne r who has privileges to create a new project from the template, complete the implementation and deploy it to the run time. Our user community and the tools we’ll be using are below:
Persona User Name Tool Used
Business Analyst Wshake Composer
Developer Weblogic BPMStudio(JDeveloper)
Process Owner Sfitzger Composer
Note: Normally templates, blueprints,, projects can be shared directly between the Composer and Studio environme nts. However, due to firewall restrictions on Amazon EC2 we’re not able to create those connections. The Appendix to the lab guide shows how to set up the connection and examples of using Studio to communicate directly with MDS.
Creating a Process Blueprint in BPM Composer
In this exercise we will login to BPM Composer as wshake (a Business Analyst who has the privilege to create new processes).
Objectives
After completing this lesson, you will know how to:
Create process blueprint using BPM Composer.
Export the project so it can be opened in BPM Studio
As noted above, this could alternatively be accomplished by a direct connection from BPM Studio to MDS
1. Open your browser (Firefox 3+ or IE7+) and go to http://orabpm- server:8001/BPM/Composer.. Login as wshake/welcome1
3. Select the Create a Blank Project option, name the Project HelloWorld, make sure the Enable Sharing and Begin Editing Now checkboxes are selected, and click
Create.
4. Right-click the Process Node and Select New|Process.
5. In the New Process dialog set the Name to SayHello, leave Synchronous Service as the pattern, and click OK.
6. Drag the Service Task activity between the Start and End gateways. Drop it when the sequence flow line begins to pulse.
Because we selected Synchronous Service as the pattern, we have a Start and End Message gateways. This service enables our process (i.e. It will expose it as a Web Service.
7. Select the label and rename it CallAService.
9. Select Export Project from the Tools drop-down.
10. Save it C:\JDeveloper\mywork\HelloWorld.exp on your desktop (or somewhere else you can find it).
11. Sign out of BPM Composer
Creating a Process Template in BPM Studio
Process templates can be created in BPM Studio to create a catalog of Business Objects, Services, Process Data Object, Rules and Human Tasks which can then be shared with others (typically process owners) who provide a final concrete project which is customized and deployed for a specific use case. In our example will add one simple Service to our initial blueprint which will allow our Process Owner to create a deployable project.
For brevities sake we are going to create a Mediator which will accept an input value, and return an output value. In the real world, mediators are often use to provide transformation and routing capabilities to our composite to talk to an actual Web Service or Adapter service. We’ll just be echoing back a response without a real service behind it.
1. Open BPM Studio/JDeveloper with a Default role if not already open. 2. From the Menu Bar, select File|Import.
4. Open the HelloWorld.exp file you saved in the earlier step and click through to import.
6. Navigate to the SayHello process and double-click to open in the editor.
7. Create a new Process Data Object(variable) for you process in the structure pane on the lower left. Call it stringDataOjbect leave the type as String and click OK.
8. Double-Click the Start node to open it. We’ll be defining the input to our process, remember it will be a WebService rather than a Form which starts this process.
9. Switch to the Implementation tab and click the Green Plus icon.
10. Change the Name of the argument to inArg. Leave the type as String and click OK.
12. Drag the stringDataObject variable to the Outputs on the right. Click OK
We’re going to do the same thing for our End message node. This will define the output we send to the calling client.
14. Double-click the End node to open.
16. Select Use Associations and click the pencil icon.
17. Drag stringDataObject to the left Inputs field and click OK.
Creating a Mediator Service
Mediator services are valuable for performing routing and transformation operations outside of your BPMN model, but still within the same deployable unit. As stated before, these normally call real services, but in our simplified case we’re going to just echo back the request with some changed data.
19. Switch back to the Application Navigator view and find the composite.xml for the HelloWorld project and double-click to open the composite editor.
20. Drag a Mediator component from the component palette on the right and drop it into the middle Components lane above the model.
21. Leave the default name of Mediator1, Select Synchronous Inte rface from the drop- down.
23. Double-click the Mediator component to open it’s editor.
24. Click the Green Plus icon to create a static routing rule.
26. Click the Assign Values icon.
27. Click the Green Plus icon to assign values
28. On the From side of the dialog select expression. Then click the Expression Builde r icon.
29. In the expression builder type in concat(“Hello “,
30. Then select the inp1:input node and click Insert Into Expression
32. On the To side again select expression and click the Expression Builder icon.
33. Select the inp1:input node, click Insert Into Expression and click OK.
35. And OK again.
36. Do a Save All
38. Switch back to the BPM Project Navigator
39. Right-click the HelloWorld project and select Convert To Template.
Now that we have a template, we can decide what users can or must modify to implement the process in Composer. First we’ll set the properties globally for the process.
41. In the Advanced tab, check the boxes for Flow Sealed and Activity Sealed, click OK.
42. Now we’ll override these preferences and say implementers Must Implement the CallAService activity. Right-click and select Properties, or double-click the Service Task. For Permissions select Must Implement and click OK.
Creating a Process from a Project Template using Composer
Usually at this point we can publish our te mplate to MDS directly from BPM Studio. Again because of fire wall restrictions, we can’t. Your image contains this template already loaded to MDS.
We’re switching hats again. This time we’re a Process Owner who has been given privileges to create projects from templates and deploy them. Our sample user is sfitzger.
1. From your browser go to http://orabpm-server:8001/BPM/Composer. Log in as sfitzge r/welcome1.
2. Click Create New Project.
3. Select the HelloWorld Template, give the project a name of MyHelloWorld, check the Begin Editing Now checkbox and click Create.
4. Right-click the SayHello process and select Open.
5. Right-click the CallAService activity and select Properties.
6. Select the Implementation tab, and the Change button to select Mediator1. Highlight Mediator1 under the services and click OK.
7. With CallAService select, click on the Data Association button.
8. Under the execute panel, click the down arrows to show the input attributes, then drag the stringDataObject variable into BOTH the Inputs and Outputs fields exposed. Then click the Apply button at the top.
9. Select Publish from the Editing drop-down.
We’re now ready to deploy. Normally, deployment would not be done by a Process Owner, but would instead launch an approval workflow to the BPM Administrator. But to save some steps, we’ll do it directly.
10. Select Deploy Project from the Tools drop drop-down.
11. Enter in the deployment dialog: New Revison Id:1.0, Deployer Username:we blogic,
12. You should see a dialog saying the deployment was successful, Click OK and sign out of Composer.
13. We can test this process directly from a SOAP test page. Go to http://orabpm-
server:8001/soa- infra. When prompted enter weblogic/welcome1 as the username
14. Click the link for Test SayHello.service
16. When the Test Result returns, click the link for Formatted XML, You should see your Hello message back.