Launch a dialog and enable end user select assignee on workflow route

 Scenario: End user should be able to select the assignee from a group on workflow route and assignment needs to be created for the selected person on the run.

Solution: Launching a dialog on workflow route, to provide a field with a lookup of the person group, so user could select the assignee. 

Steps to follow:

1. Create a non-persistent attribute ex: PO.ABGROUPASSIGNEE to be same as PERSON.PERSONID.

2. Create a dialog in the PO.xml as below:

    <dialog id="abcgroupassignee" label="ABC Group Asignee">

        <section id="1528394091">

            <textbox dataattribute="ABGROUPASSIGNEE" id="1528394092" lookup="ABGROUPASSIGNEE"/>

        </section>

        <buttongroup id="abcgroupassignee_buttongrp">

            <pushbutton default="true" id="1528394093" label="OK" mxevent="dialogok"/>

            <pushbutton id="1528394094" label="Cancel" mxevent="dialogcancel"/>

        </buttongroup>

    </dialog>

3. Add lookups for the group selection:

<table id="ABGROUPASSIGNEE" inputmode="readonly" selectmode="single" mboname="PERSON" whereclause="personid in (select person.personid from person, persongroupteam where person.personid=persongroupteam.resppartygroup and persongroupteam.persongroup='ABGROUP')">

<tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="abcgroupassignee_lookup_tablebody">

<tablecol dataattribute="personid" id="abcgroupassignee_lookup_tablebody_col_2" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>

<tablecol dataattribute="displayname" id="abcgroupassignee_lookup_tablebody_col_5" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>

<tablecol dataattribute="department" id="abcgroupassignee_lookup_tablebody_col_7" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>

<tablecol dataattribute="location" id="abcgroupassignee_lookup_tablebody_col_8" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>

</tablebody>

</table>

4. Create a sigoption ABGROUPASSIGNEE in the PO.xml, grant access to the appropriate group.

5. Add select action menu - ABGROUPASSIGNEE in the PO.xml.

6. Revise the PO workflow : 

Add a condition node  at a place where you would want the user to select the group to check if the non-persistent attribute PO.ABGROUPASSIGNEE is empty, to launch the dialog.

(length(:ABGROUPASSIGNEE ) = 0 or :ABGROUPASSIGNEE is null)

Followed by an interaction node --> In the interaction node properties : Select PO.xml in the Application field, next you will be able to select the action from the lookup --> Select ABGROUPASSIGNEE



7. Create a role as a dataset using relationship between PO and PERSON and add the role to send assignments.

8. Enable/Activate the workflow based on the type of workflow and test.

Comments

Post a Comment

Popular posts from this blog

BMXAA6445E - Cache INTOBJECT could not be initialized. Log out and then log in again to refresh your database connection #BMXAA6445E #BMXAA7733E

Maximo | Scheduling, Generating & Posting a report to server | #Maximo #AutomationScript #Cron