Tuesday, January 13, 2009

HTTP Inbound Initate Activty and Debugging a Process

In this post I will explore the new debug feature in process builder 6.5 and also the HTTP inbound Initiate activity template. I will add to the workflow that was developed in the previous posts

HTTP Inbound Activity
HTTP Inbound activity is part of BPS or Process integrator product from Documentum. They basically let the outside world(outside of Documentum enterprise space) to send and receive messages to Documentum enterprise application through Documentum Process. Thre are 2 mail components for BPS outbound and inbound. outbound will send messages out and inbound will listen for messages. The messages can come/go in different formats/protocols like HTTP, JMS and Web Services. Here we will look a how we can send a http message to a Documentum process. To keep it simple w will not extract any content from the http message we are going to send, although a normal application will do that.

Adding HTTP Inbound Initiate activity
1. Open the workflow built in the last couple of post and uninstall it
2. In the 'Activity Templates' side bar open up the 'Integration' folder. The 'Integration' folder contains all the activities that belong to BPS/Process Integrator that deals wil Inbound and Outbound messaging for various protocols.
3. select the activity called 'HTTP Inbound Initate' and drag it to the work area. Since this is an initiate step it can be the start step of the workflow.
4. Connect the connector so that it flows from HTTP inbound Initiate activity to the first user activity 'Activity-1'
5. Open up the Activity Inspector for the HTTP inbound Initiate activity and go to the 'HTTP' tab and fill in the 'URLSuffix' box with 'BPMPost', without the quotes. Also set the 'Request Type' combo box to 'Post'.

6. Save, validate and install
Debugging Process flow

7. Goto File->Preferences and take a not of the 'HTTP/WebService Inbound port number', the default is 13,000.
8. Create a html file like the one shown in the image. Note that the port number from the preference and the URLSuffix from the Activity Inspector is used in creating the URL to which the form is submitted.

9. Go ahead and hit the debug button on the tool bar.
10. In the dialog that opens select the radio button that says 'Start workflow using the Inbound Initiate Listener' and hit the button 'Start listeners'
11. Open the HTML file that was created in the step 8 and hit the submit button.
12. You will get a response saying 'HTTP request processed success'
13. The debugger will step through your activities and wait on the 'Activity-2', if the workflow was exactly created as this and previous posts directed.
14. The debugger is stopped at this point because there is an exception path defined for this flow. In the debugging console that opens up below the process work area you can see 2 boxes which list 'Forward Activities and 'Reject activities'. Select the forward activity and buttons will show up below that. Hit the 'Finish' button.
15. The debugger will continue executing the rest of the process and completes successfully.
16. Clicking on the console tab will show the debug log.
17. For the automatic activity to be executed successfully during debug, make sure the class file is copies to C:\Program Files\Documentum\bpm\classes\custom. This is where the debugger loads workflow method classes from.

No comments:

Post a Comment