Class WorkitemLinkController

java.lang.Object
org.imixs.workflow.office.forms.WorkitemLinkController
All Implemented Interfaces:
Serializable

@Named @RequestScoped public class WorkitemLinkController extends Object implements Serializable
The WorkitemLinkController provides suggest-box behavior based on the JSF 2.0 ajax capability to add WorkItem references to the current WorkItem. All WorkItem references will be stored in the property 'txtworkitemref' Note: @RequestScoped did not work because the ajax request will reset the result during submit
Version:
1.0
Author:
rsoika
See Also:
  • Field Details

    • MAX_SEARCH_RESULT

      public static final int MAX_SEARCH_RESULT
      See Also:
    • logger

      public static Logger logger
    • workflowService

      protected org.imixs.workflow.engine.WorkflowService workflowService
    • schemaService

      protected org.imixs.workflow.engine.index.SchemaService schemaService
    • workflowController

      @Inject protected org.imixs.workflow.faces.data.WorkflowController workflowController
  • Constructor Details

    • WorkitemLinkController

      public WorkitemLinkController()
  • Method Details

    • searchWorkitems

      public void searchWorkitems()
      This method searches a text phrase within the user profile objects (type=profile).

      JSF Integration: <h:commandScript name="imixsOfficeWorkflow.mlSearch" action= "#{cargosoftController.search()}" rendered="#{cargosoftController!=null}" render= "cargosoft-results" />

      JavaScript Example:

       
        imixsOfficeWorkflow.cargosoftSearch({ item: '_invoicenumber' })
        
       
    • searchWorkitems

      public List<org.imixs.workflow.ItemCollection> searchWorkitems(String phrase, String filter)
      This method returns a list of profile ItemCollections matching the search phrase. The search statement includes the items 'txtName', 'txtEmail' and 'txtUserName'. The result list is sorted by txtUserName
      Parameters:
      phrase - - search phrase
      Returns:
      - list of matching profiles
    • getSearchResult

      public List<org.imixs.workflow.ItemCollection> getSearchResult()
    • computeSearchHash

      public static int computeSearchHash(String _phrase, String _filter)
      Helper method compute a hash from a phrase and a filter rule
    • getReferences

      public List<org.imixs.workflow.ItemCollection> getReferences()
      This method returns a list of all ItemCollections referred by the current workItem (txtWorkitemRef).
      Returns:
      - list of ItemCollection
    • getReferences

      public List<org.imixs.workflow.ItemCollection> getReferences(String filter)
      This method returns a list of ItemCollections referred by the current workItem ($WorkitemRef).

      The filter will be applied to the result list. So each WorkItem will be tested if it matches the filter expression.

      The resultset is sorted by $created

      Returns:
      - list of ItemCollection with matches the current filter
    • getReferencesByIdList

      public List<org.imixs.workflow.ItemCollection> getReferencesByIdList(List<String> ids)
      This method returns a list of ItemCollections referred by list of IDs.
      Returns:
      - list of ItemCollection with matches the given ids
    • getExternalReferences

      public List<org.imixs.workflow.ItemCollection> getExternalReferences()
      Returns a list of all workItems holding a reference to the current workItem.
      Returns:
      Throws:
      NamingException
    • getExternalReferences

      public List<org.imixs.workflow.ItemCollection> getExternalReferences(String filter)
      returns a list of all workItems holding a reference to the current workItem. If the filter is set the processID will be tested for the filter regex
      Parameters:
      filter -
      Returns:
      Throws:
      NamingException
    • getWorkitem

      public org.imixs.workflow.ItemCollection getWorkitem(String id)
      Helper method to load a full workitem from the frontend
      Parameters:
      id -
      Returns: