- Create a workitem business object, call it WI
- Create a workflow, call it W01
- Create two activities, call them A01 and A02
- Create a transition from A01 to A02 called A01_to_A02
- Create a new rule called get_wf_info;
- Usage general, rule type NonQuery SQL
The body of the rule will be
DECLARE v_col_Id integer; v_col_WF varchar2(255); v_col_activity varchar2(255); begin select col_id, col_workflow, col_activity into v_col_Id, v_col_WF, v_col_activity from tbl_WI where col_instanceId = :instance_id; :id := v_col_id; :wf := v_col_WF; :activity := v_col_activity; end;
- Click Save
- Click on the Parameters tab
- Check that id is type integer and behavior output
- Check that instance_Id is type text and behavior output
- Check that wf is type text and behavior output
- Create a new rule called Route_WF; rule usage general and rule type composite
- Click on the Parameters tab
- Add a parameter called Activity of type text and behavior output
- Add a parameter called ID of type integer and behavior output
- Add a parameter called Workflow of type text and behavior output
- Click on the Composite Rule tab
- Drag a Define block into the Begin End block
- Set Name to Instance_Id
- Set Clr Type to String
- Drag a Create Workflow block into Begin End
- Set Workflow to W01
- Set Activity to A01
- Set Owner to yourself
- Set Instance ID Map to Instance_Id
- Drag an Invoke Rule block into Begin End
- Set Data Source to get_WF_info
- Set the value of instance_id to Instance_Id
- Drag a Send Workflow block into Begin End
- Set the send mode to Auto
- Set InstanceId to Instance_Id
- Set workflow to W01
- Drag an Invoke Rule block into Begin End
- Set Data Source to get_WF_info
- Set instance_id to Instance_Id
- Set id to Id
- Set wf to Workflow
- set activity to Activity
- Drag a Define block into the Begin End block
- Click Save
- Click on the Parameters tab