RJS Software provides a tag library in Enterprise Workflow for accessing workflow and workpiece information from a JSP page. Include the following directive in your JSP page to access the tag library:
<%@ taglib prefix="wffn"uri="http://www.rjssoft.com/jsp/taglib/workflow"%>
 
All the workflow tags require the useBean directive in the JSP page. In user property, use the user information that the Login.jsp page sets in the cookies:
 
 
To gather the basic workpiece information, use the c:set tag from the core standard tag library. The following code uses the connection to the workflow engine in WorkflowWebserviceProxySecurity through beanWorkflowWebserviceBean to place the workpieceInfo array into the variable workpieceInfo and the notes string into the variable workpieceNotes. wffn:getWorkpieceInfo is a function in the workflow tag library that takes the workflow connection bean and the workpieceID as parameters. In this example, the workpiece ID is a parameter in the URL that requested the page - for example, http://somelink/WorkflowWebServiceClients/WorkflowWebserviceClients/Work....
 

Tags

  • wffn:WorkpieceInfoOptions - Gets a list of the workpiece options available at the current step after filtering. The JSPMappingRules.xml file in the GoOptions tag provides the filter. One GoOptions tag is in a named tag in the WorkpieceInfo tag. The name of the JspMappingRules tag is passed as a parameter on the wffn:WorkpieceOptions tag. wffn:WorkpieceOptions is a looping tag set. All the HTML between the beginning and end tags is added to the resulting page for each option that matches the filter.

    For example:

     

    • items - The workpieceInfo array returned from wffn:getWorkpieceInfo();
    • var - The name of the variable to hold the set of mapped value names that represent one option.
      • optionString, optionStep, optionID, optionValidator, optionPreAction, optionPostAction. optionStep, optionID, and optionString are important when calling the advanceWorkpiece() API.
      • optionValidator, optionPreAction, and optionPostAction contain JavaScript.
      • The JavaScript comes from the JspMappingRules XML file. In most cases, the JavaScript is a function call to a function in a script file that is loaded separately.
    • varStatus - The name of the variable to hold information about the current state of the loop:
      • statusName.first - A boolean that is true if the current iteration is the first iteration.
      • statusName.last - A boolean that is true if it is the last iteration.
      • statusName.index - The 0-based index of the item in the array.
      • statusName.count - The 1-based count of iterations.
  • wffn:WorkpieceInfoValuesGrid - Iterates over all workpiece values (attributes) in the format {grid}_{row}_{column} that have the value for {grid} that is passed to the tag.

    For example: To produce a grid with two columns (col1 and col2) for each row of workpiece values with grid name Grid and add a line for new values, whose row value is one more than the last line retrieved:



    addValueForm(document.forms['Form_${row.gridName}_${row.rowNumber}_${heading}']);



    addValueForm(document.forms['Form_${row.gridName}_${row.rowNumber+1}_${heading}']);


    "

    • items - The workpieceInfo array returned from wffn:getWorkpieceInfo();
    • var - The name of the variable to hold the set of mapped value names that represent one row of the grid. Mapped values include all the column names found, rowNumber, and gridName. varName[column name] contains the value in the workpiece attribute in the format {grid}_{row}_{col name}, where varName is the name of the variable identified in the var attribute of the tag.
    • varStatus - The name of the variable to hold information about the current state of the loop:
      • statusName.first - A boolean that is true if the current iteration is the first iteration.
      • statusName.last - A boolean that is true if it is the last iteration.
      • statusName.index - The 0-based index of the item in the array.
      • statusName.count - The 1-based count of iterations.
    • gridName - The string value of the name of the grid to be iterated.
  • wffn:concat() - Concatenates arrays so you can iterate over the combined array with a c:forEach tag.

    For example:

    ${wffn:concat(sourceArray1, sourceArray2)}

  • wffn:sort() - Sorts an array of maps and returns an array like the array in the first parameter with entries sorted in ascending order by the name of the values in the second parameter. Each map in the source array contains a value with the name given in the second parameter.

    For example:

    ${wffn:sort(sourceArray,valueName}

  • wffn:getWorkpieceInfo() - Gets the full workpieceInfo array for the workpiece.

    For example:

    ${wffn:getWorkpieceInfo(WorkflowWebServiceConnectionBean,workpieceID)}

  • wffn:getWorkpieceValuesMap() - Gets the workpiece attribute values from the workpieceInfo array as a map. For example: Saves the result using c:set in a value named values and references each value by name as values.ValueName or values[ValueName].

    For example:

    ${wffn:getWorkpieceValuesMap(workpieceInfo)}

  • wffn:getWorkpieceNotes() - Gets the workpiece notes.

    For example:

    ${wffn:getWorkpieceNotes(WorkflowWebServiceConnectionBean,workpieceID)}

  • wffn:userIsAuthorized() - True or false.

    For example:

    ${wffn:userIsAuthorized(WorkflowWebServiceConnectionBean,privilegeName)}

  • wffn:userIsAuthorizedToWorkbasket() - True or false.

    For example:

    ${wffn:userIsAuthorizedToWorkbasket(WorkflowWebServiceConnectionBean,privilegeName, workbasketName)}

  • wffn:userIsAuthorizedToClass() - True or false.

    For example:

    ${wffn:userIsAuthorizedToClass(WorkflowWebServiceConnectionBean,privilegeName, workpieceClassName)}

  • wffn:getUserGroupMemberList() - Returns a sorted list of users in the group.

    For example:

    ${wffn:getUserGroupMemberList(WorkflowWebServiceConnectionBean,groupName)}

  • wffn:getWorkbasketList() - Returns a sorted list of Map objects of all the workbaskets the user has authority to list. Each element of the array is a Map of values that can be accessed by name: WorkbasketName, AccessListName, CreatedBy, and CreatedDate.

    For example:

    ${wffn:getWorkbasketList(WorkflowWebServiceConnectionBean)}

  • wffn:getWorbasketTOCSize() - Returns a string representation of the count of workpieces in the workbasket.

    For example:

    ${wffn:getWorkbasketTOCSize(WorkflowWebServiceConnectionBean,workbasketName)}

  • wffn:getWorbasketTOC() - Returns an array of Map objects, where each element in the array is a Map of certain workpiece information. Members of the map may be referenced by name: workpieceID, workpieceClass, priority, description, column1, column2, and column3.

    For example:

    ${wffn:getWorkbasketTOC(WorkflowWebServiceConnectionBean,workbasketName)}

  • wffn:getClassList() - Returns an array of Map objects, where each element in the array is a Map of class attributes that may be accessed by name: name, description, accessList, createdBy, and createdDate.

    For example:

    ${wffn:getWorkpieceClassListWorkflowWebServiceConnectionBean)}

  • wffn:getWorkpieceClassColumnList() - Returns an array of string column names in the order specified for the workpiece class.

    For example:

    ${wffn:getWorkpieceClassColumnList(WorkflowWebServiceConnectionBean,className)}

 

Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: December 10, 2016