Skelta Workflow.NET 2004 Help
Using Work Action

Skelta Workflow.NET 2004 provides some standard actions, which can be used for creating the workflows. The Work action is one of the most powerful and flexible actions among them. The Work action can be created based on user roles and without roles. The UI to configure the Work action properties can be displayed in either a Role Based View or a General View. This reduces much of the need for creating custom actions.

The Role-based Work action is used to provide the flexibility of showing the UI based on the user role. The Work action is configured using XML configuration files and a HTML template to render the UI.

Work Action with General Functionality (without Role):
Work Action with Role Based Functionality:

Activity Control Properties to be set for enabling Role Based View in Activity List:

To enable Role Based UI in the Activity List it is mandatory to set either of these Activity Control properties - LoggedInUserIDInteger or LoggedInUserIDString.

The "Approve Reject and Escalate.xml" XML configuration file is shown below:

Elements and attributes specified in the XML file:

Template Name: The name of the HTML file that will be used by this action to render it in the UI control is specified in the <HtmlTemplate> element.

ActionOutPut Variables: The ActionOutput variables that are used to specify all the possible outcomes for the action are specified using the ActionOutput element. The attributes to be specified are described here.

Input Variables: The Input Variables that are used to fill the button values, dropdown values, etc., are configured using the InputVariable element. The values for the input variables are associated with workflow variables or with static values. The attributes to be specified are described here.

Output Variables: The Output Variables that will be used to store the values from various attributes are configured using the OutputVariable elements. The attributes to be specified are described here.

Note: When you use Input Variables for displaying the button value that will render in the UI, you need to make sure that the Input Variable value and the ActionOutput variable Alias value denoted as Mapped Outputs must be the same.

The "Approve Reject and Escalate.htm" HTML Template file is shown below:

(This template uses the parameters defined in the “Approve Reject and Escalate.xml” file to render the UI to the user.)

The part of the HTML Template where the placeholders are replaced with the input variables configured in the XML file is shown below. This template should have a hidden variable named actionOutPut, for capturing the value inside the control for alerting the action.


<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1">
<TR class="N-MainBGCOLOR">
   <TD align=center width="15%">
   <input type="Submit" class="button2" name="btnClickSubmit" value="<%#approvealias%>" onclick="javascript:BtnClicked(this)">
   </TD>
   <TD align=center width="15%">
   <input type="Submit" class="button2" name="btnClickSubmit" value="<%#rejectalias%>" onclick="javascript:BtnClicked(this)">
   </TD>
   <TD align=center width="15%">
   <input type="Submit" class="button2" name="btnClickSubmit" value="<%#escalatealias%>" onclick="javascript:BtnClicked(this)">
   </TD>
   <input type="hidden" name="actionOutPut" value="" >
</TR>
</Table>

<Script>
function BtnClicked(clickObj
{

   document.getElementsByTagName("input")["actionOutPut"].value = clickObj.value;

}
</Script>

Note: 1. The placeholder name used in the template should be the name of the input variables used in the xml file so that the placeholder value will get replaced at run time with the input variable value. In the above example, “approvealias”, “rejectalias” and “escalatealias” are the input variables in the Approve Reject and Escalate.xml file.

2. The function “BtnClicked(clickObj)” is used to capture the output to alert the action with the output.

Steps to create an XML Configuration file for the Work Action:

Consider the example of displaying the UI shown below to the users. For this, you will need to create the XML configuration file and the HTML Template file, say WrkSendBack.xml and WrkSendBack.htm, under the "…\Actions\WorkAction" folder. This section describes the steps to create the XML file.


Specifying the start and end tags:

Specifying the HTML Template Name:

Specifying Action Outputs:

Specifying Input Variables:

Specifying Output Variables:

Steps to create a HTML Template file (WrkSendBack.htm) for the Work Action to render the UI shown in the previous section:

<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="2">
 <TR height=10%>
      <%#Acknowledge%>
 </TR>
      <%#Notes%>
 <TR VALIGN="TOP" CLASS="RUNTEXT1">
   <TD width=75%>
        <IFRAME name="<%#framename%>" src="<%#DocumentWindow%>" width="100%" height="100%" Border="0">
        </IFRAME>
   </TD>
   <TD>
      <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="5">
        <TR CLASS="RUNTEXT1">
          <TD align=left>
            Comments           </TD>
        </TR>
      </TABLE>    <TD align=center width="15%">
   <input type="Submit" class="button2" name="btnClickSubmit" value="<%#escalatealias%>" onclick="javascript:BtnClicked(this)">
   </TD>
 </TR>
<TABLE>

<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="1">
 <TR class="N-MainBGCOLOR">
   <TD align=center width="15%">
     <input type="Submit" class="button2" name="btnClickSubmit" value="<%#approvealias%>" onclick="javascript:BtnClicked(this)">
   </TD>
   <TD align=center width="15%">
     <input type="Submit" class="button2" name="btnClickSubmit" value="<%#rejectalias%>" onclick="javascript:BtnClicked(this)">
   </TD>
   <TD align=center width="15%">
     <input type="Submit" class="button2" name="btnClickSubmit" value="<%#sendbackalias%>" onclick="javascript:BtnClicked(this)">
   </TD>
     <input type="hidden" name="actionOutPut" value="" >
 </TR>
</Table>

<Script>
function BtnClicked(clickObj
{

   document.getElementsByTagName("input")["actionOutPut"].value = clickObj.value;

}
</Script>

Note: 1. The <%#Acknowledge%> placeholder is used to display the Read Acknowledgement.

2. The <%#Notes%> placeholder is used to display the notes if we specify in the action.

3. TThe <IFRAME> tag is used to display the details page inside an IFrame.

4. The <TEXTAREA> tag is used to show the comments.

5. The "<%#approvealias%>", "<%#rejectalias%>" and "<%#sendbackalias%>" placeholders are used as the input variables in the WrkSendBack.htm file.

6. The "actionOutPut" hidden variable is used to store the output to alert the action with.

7. The function "BtnClicked(clickObj)" is used to capture the output to alert the action with.

Steps to use the created xml file (WrkSendBack.xml) and HTML template (WrkSendBack.htm) in the Work Action:
Steps to Use GroupUI:

For details on setting the Work Action properties, see the Work Action topic under References\Actions\Resource Actions.




 Skelta - A BPM Workflow Software Company