MAIN arrow Samples-5.1 arrow Indicate fault using throw

Indicate fault using throw

Print E-mail

zip indicatefault 04/02/2008,05:48 14.75 Kb

 

Description:

Whenever we check for a condition we either get correct results if condition is satisfied or we get error if condition is not satisfied, thus this use case explains the method to generate error as well as handle the error that is generated if the condition is false.In the given process if the input given is greater than '0' then the process will display correct result and if the input given is less than '0' then the process will throw an Exception.Sending the input for following cases:

  1. If input received is 1,output is displayed, as 'The value entered is greater than 0'.
  2. If input received is -1,output is displayed, as 'This is the error generated on giving wrong input value'.

 

Use case dependencies:

message.xsd The schema used is "start" which is of "string" type.

 

Requirements:

  1. Intalio|BPMS Server-5.1.1
  2. Intalio|BPMS Designer-5.1.1

 

Process Download & Import:

  1. Download 'Indicate_Fault.zip'.
  2. Go to File > Import...
  3. In the Import wizard, select 'Existing Projects into Workspace', click Next >
  4. Select the "Select archive file" radio button.
  5. Browse to select the downloaded archive file.
  6. Click to Finish.
  7. Update project builders by right click on project; go to BPMS Designer Tools > Update BPMS Builders.

 

faulthandling.jpg

Please follow these below instructions to remake the process

 

Preconditions:

  1. Make sure Intalio|BPMS Server is up and running fine.

  2. For the first time, go to "File > New > select "Intalio|BPMS Business Process Project".

Steps to remake the process:

  1. Go to New > select "Intalio|BPMS Business Process Project".

  2. Provide Project name as "IndicateFault", and click to Finish.

  3. Right click on the project; go to New> select "Business Process Diagram".
  4. Provide diagram name as "IndicateFault" click to Finish.
  5. A pool with a task is available in BPMN Editor Pane, name default pool as 'Client' and task as 'send'.

  6. Right click on client pool and select "Set pool non executable".

  7. Add new pool by click on BPMN Editor (select "Add Pool" option from pop up menu) and name it as "IndicateFault".

  8. Focus on send task; drag out going message flow icon to "IndicateFault" pool and select the option "Connect to a new Task", name this new task as "receive".

  9. Focus on the receive task and drag the outgoing sequence flow icon to "Connect to a new Sub-Process", name this new subprocess as "sub-one" and the default task available in the subprocess as "invoke".

  10. Inside the subprocess drag the outgoing sequence flow icon from the "invoke" task to "connect to a new Exclusive Data-based gateway". Name this gateway as "condition"

  11. Focus on the "condition" gateway and drag the outgoing sequence flow icon to "Connect to a new Task" Name this task as "output".

  12. Again focus on the "condition" gateway and drag the outgoing sequence flow icon to "Connect to a new Error Intermediate Event" Name this event as "inner error".

  13. Right click on the connection between "condition" gateway and "inner error" and select the option "Sets as default choice".

  14. Focus on the boundary of "sub-one" Sub-process (Near to expand/collapse button of Sub-process) "Sub-process event holder" a pop up menu will be available.

  15. Select "Add Error Intermediate Event" option from the pop up menu available.

  16. Drag the outgoing sequence flow icon from the sub-one subprocesses to "Connect to a new Task", name this new task as "reply".

  17. Drag the outgoing sequence flow icon from Error intermediate event (which is on boundary of the sub-one subprocesses) to "Connect to a new Task"; name this new task as ThrowError".

  18. Focus on reply task and drag the out going message icon from boundary and connect to "send" task in the Client Pool.

  19. Import schema files from zip file into the project ((or) You can also create your own schema from File > New > Other > XML > XML Schema).

  20. Drag and drop message.xsd > tns:start schema node on to incoming message flow from "send" task to "receive" task.

  21. A message "Set schema element 'start' as the content of the message" will prompt you, click on it.

 

Defining Outgoing Mapping:

  1. Make sure Mapper view is visible (go to Windows > Show View > Mapper).

  2. In the process model select "Condition" gateway.

  3. Go to Window-> Show View->Palette and select it.

  4. Drag the Mapper Palette to other location from where you can easily dnd any operator onto the Mapper.

  5. Go to Mapper Palette and expand "Functions and Operators on Numerics Comparison of Numeric Values" and dnd "op:numeric-greater-than" operator onto the Mapper Area.

  6. Go to Mapper tool bar, click on "creates a new operator" button available and again click on work area of Mapper.

  7. Provide "0" in the text box without double quotes.

  8. Click on "$thisReceiveRequestMsg:body" node in the left side of the Mapper.

  9. Click on the left edge of the textbox displaying ">" (greater than operator) available in the work area.

  10. Again click on right edge of textbox displaying numeric value "0" and then click on left edge of textbox displaying ">" operator.

  11. Again click on right edge of textbox displaying ">" operator and then click on "condition" node given in right side of mapper.

  12. Go to modeler and click "output" task and go to the mapper area.

  13. Go to mapper tool bar, click on "creates a new operator" button available.

  14. Provide "The value entered is greater than '0'" in textbox without double quotes.

  15. Click on right edge of textbox displaying "The value entered is greater than '0'" operator and then click on "$thisReceiveRequestMsg:body" node given in right side of mapper.

  16. Now click on "fault" Task in the modeler area.

  17. Go to mapper tool bar, click on "creates a new operator" button available and again click on work area of Mapper.

  18. Provide "This is the error generated on giving wrong input value" in the text box within double quotes.

  19. Right click on textbox displaying "This is the error generated on giving wrong input value" and again click on right side of "$thisReceiveRequestMsg:body".

  20. Now click on 'reply' task and go to mapper window.

  21. Go to mapper tool bar, click on "Connects operators and nodes" button available.

  22. Go to the left side of mapper and click on "$thisReceiveRequestMsg:body" node and then click on "$thisReceiveResponseMsg:body" node given in right side of mapper.

  23. Save the process model.

  24. Now your process is fully implemented which is ready to deploy and execute within Intalio|BPMS Server.

Process Deployment & Execution:

  1. Click on Deploy Project to Intalio|BPMS Server button in tool bar.

  2. Make sure you select all runtime files while exporting to Intalio|BPMS Server.

  3. Click on Finish button.

  4. Open a web browser, provide url as: http://localhost:8080/bpms-console, which takes to login screen for bpms-console.

  5. Login with the following credentials:
    username: 'admin' (without quotes).
    password: 'changeit' (without quotes).

  6. Bpms-console wil be available with deployed processes list.

  7. You should see "IndicateFault:IndicateFault" process with a package name "IndicateFault", select it and click to Start.

  8. This should generate a form with an input text field.

  9. Type '-1' in start field, then click on Submit button.

  10. This will replace the page with an output like "receiveResponse: This is the error generated on giving wrong input value".

Last Updated ( Feb 06 2008 )
  < Prev Next >