Customize workflow so that the approval of the workitem is not required by every member of the role i.e. just approval should be enough.

Customize workflow so that the approval of the workitem is not required by every member of the role i.e. just approval should be enough.

book

Article ID: KB0089274

calendar_today

Updated On:

Products Versions
TIBCO ActiveCatalog -
Not Applicable -

Description

Resolution:
Description
============
Customizing workflow so that the approval of the workitem is not required by every member of the role i.e. just approval should be enough.

Environment:
============
TIBCO Product name and version: TIBCO Collaborative Information Manager 7.x / 8.x
Operating System(s): All Operating Systems

Symptoms:
============
The product add/edit workflows (wfin26productaddapprovalv3/wfin26producteditapprovalv3) shipped with the product requires the approval workitems to approved by every member and then only the workflow proceeds.

Cause:
============
This is because of transition configuration.

Resolution:
============
To achieve the scenario mentioned above, one can customize transition in the standard product add workflow (wfin26productaddapprovalv3.xml).

Existing Transition
-----------------------
&ltTransition FromActivity="InternalEditWorkItem" ToActivity="InternalEditWorkItem">
        &ltDescription&gtTest that all created edit workitems have been completed or someone has rejected workitem.</Description>
        &ltRule>
            &ltParameter name="wicreated" type="boolean" eval="variable" direction="in"&gteditFlag</Parameter>
            &ltParameter name="numberCreated" type="long" eval="variable" direction="in"&gtNumberCreated</Parameter>
            &ltParameter name="numberCompleted" type="long" eval="variable" direction="in"&gtNumberCompleted</Parameter>
            &ltParameter name="response" type="string" eval="xpath" source="/Message/Body/Document/BusinessDocument/CatalogAction/CatalogActionHeader/CatalogActionHeaderAck[last()]/AcknowledgmentCode/Code/Value/text()" direction="in"&gtworkDoc</Parameter>
            &ltParameter name="result" type="boolean" direction="out"/>
            &ltCondition format="java"><![CDATA[
                com.tibco.mdm.workflow.engine.transition.WfSharedConditionTransition.responseDoesNotEqualReject(wicreated, numberCreated, numberCompleted, response);
             ]]></Condition>
        </Rule>
    </Transition>

Modified Transition
------------------------
&ltTransition FromActivity="InternalEditWorkItem" ToActivity="InternalEditWorkItem">
        &ltDescription&gtTest that all created edit workitems have been completed or someone has rejected workitem.</Description>
        &ltRule>
            &ltParameter name="wicreated" type="boolean" eval="variable" direction="in"&gteditFlag</Parameter>
            &ltParameter name="numberCreated" type="long" eval="variable" direction="in"&gtNumberCreated</Parameter>
            &ltParameter name="numberCompleted" type="long" eval="variable" direction="in"&gtNumberCompleted</Parameter>
            &ltParameter name="response" type="string" eval="xpath" source="/Message/Body/Document/BusinessDocument/CatalogAction/CatalogActionHeader/CatalogActionHeaderAck[last()]/AcknowledgmentCode/Code/Value/text()" direction="in"&gtworkDoc</Parameter>
            &ltParameter name="reject" type="string" eval="constant" direction="in"&gtReject</Parameter>
            &ltParameter name="result" type="boolean" direction="out"/>
            &ltCondition format="java"><![CDATA[
                com.tibco.mdm.workflow.engine.transition.WfSharedConditionTransition.equalsIgnoreCase(response,reject);
             ]]></Condition>
        </Rule>

The modified transition should ensure that workflow does not wait for approval from all the members belonging to the specified role. Single approval should be enough for it to proceed further.

Issue/Introduction

Customize workflow so that the approval of the workitem is not required by every member of the role i.e. just approval should be enough.