Interface ITaskMetadataService


public interface ITaskMetadataService
  • Field Details

  • Method Details

    • getTaskDefinitionById

      TaskDefinition getTaskDefinitionById(IWorkflowContext context, String taskDefinitionId, String mdsLabel) throws TaskMetadataServiceException
      Get the task definition object given the task definition id
      Parameters:
      context - The workflow context
      taskDefinitionId - a String value
      mdsLabel - Label associated to this task definition when persisted to mds. Can be null if not available.
      Returns:
      TaskDefinition The task definition object
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getTaskDefinitionById

      TaskDefinition getTaskDefinitionById(IWorkflowContext context, String taskDefinitionId) throws TaskMetadataServiceException
      Get the task definition object given the task definition id
      Parameters:
      context - The workflow context
      taskDefinitionId - a String value
      Returns:
      TaskDefinition The task definition object
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getTaskDefinition

      TaskDefinition getTaskDefinition(IWorkflowContext context, Task task) throws TaskMetadataServiceException
      Get the task definition object given the task object
      Parameters:
      context - The workflow context
      task - The task object
      Returns:
      TaskDefinition The task definition object
      Throws:
      TaskMetadataServiceException - if an error occurs
    • listTaskMetadata

      List listTaskMetadata(IWorkflowContext context, String keyword, String sortAttribute, String sortOrder) throws TaskMetadataServiceException
      Gets a List of the TaskMetadata objects that match the specified keyword(s). The TaskMetadata objects describe version and composite information for Human Task components.
      Parameters:
      context - The workflow context
      keyword - The keyword to search for task metadata. Method will return all TaskMetadata objects where one or more of the following columns matches the specifed keyword:
      • name
      • title
      • applicationName
      • componentName
      • compositeName
      • category
      The method supports wildcard searching - a wild card character of '%' can be used to perform partial match searches. If no keyword is specified, then the method will not fitler the search, and all TaskMetadata entries will be returned.
      sortAttribute - The attribute to sort the results by. The possible values are 'id', 'name', 'title', 'description','applicationName','compositeName', 'componentName', 'compositeVersion', 'compositeDN' If not one of the values above, it would be defaulted to 'name'
      sortOrder - The sort order - either 'ASC' or 'DESC'
      Returns:
      List List of TaskMetadata objects
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getTaskMetadataByNamespace

      TaskMetadata getTaskMetadataByNamespace(IWorkflowContext context, String taskDefinitionNamespace, String compositeVersion) throws TaskMetadataServiceException
      Gets the TaskMetadata object that describes the Human Task component with the specified task definition namespace and composite version. If no composite version is specified, the task metadata returned corresponds to the Humant Task component in the active version of the composite.
      Parameters:
      context - The worklfow context
      taskDefinitionNamespace - String the target namespace defined for the Human Task component to search for. This is the target namespace for the task definition, and is defined at design time. It defaults to "http://xmlns.oracle.com/<Application Name>/<Composite Name>/<Component Name>"
      compositeVersion - The version of the composite the workflow component is located in. If null, the currently active composite version will be used.
      Returns:
      TaskMetadata object that provides information on the specified Human Task component.
      Throws:
      TaskMetadataServiceException
    • getDeployedCategories

      Map<String,String> getDeployedCategories(IWorkflowContext context) throws TaskMetadataServiceException
      Gets the categories of currently deployed task definitions, and their localized display names. The categories retured are the values set for the category property on deployed task definitions. Only categories defined as 'STATIC' in the deployed task definitions are returned. Categories defined as 'XPATH', which use an xpath expression to load an instance-specific category, or categories defined as 'RESOURCE' which dynamically lookup the category from the task-specific resource bundle are not returned by this method.

      The display names are localized according to the Locale associated with the specified IWorkflowContext. Display names are loaded from the WorkflowLabels global resource bundle, using the category name prefix with 'TASK_CATEGORY.'. For example, 'TASK_CATEGORY.MyCategory'. If no resource string is found in the global resource bundle, the category name is used as the display name.

      The method returns a map of category names, keyed by the display names.

      Parameters:
      context -
      Returns:
      A Map of category names, keyed by the category display names.
      Throws:
      TaskMetadataServiceException
    • getOutcomes

      Map getOutcomes(IWorkflowContext context, Task task, Locale locale) throws TaskMetadataServiceException
      Get the outcomes for the given Task object. The return value is a Map containing the outcome display values for the specified Locale, keyed by the outcome value. The outcome display values are determined as follows:
      • If the task definition for the Task object specifies a resource bundle, then the display value will be looked up in Task resource bundle, using the outcome value as a key.
      • If no Task resource bundle is specified, the display value will be looked up in the WorkflowLabels.properties resource bundle using a key of the form TASK_OUTCOME.<OUTCOME VALUE>. This resource bundle will be loaded from the classpath specified in the worklfow configuration parameter workflowCustomClasspathURL, if available. If not available on the custom classpath, resource bundle will be loaded from the HWF services classpath.
      • If a resource string could not be located in a resource bundle, then the display value will be the same as the outcome value.
      Parameters:
      context - The workflow context
      task - The task object
      locale - Locale to use when looking up display strings.
      Returns:
      Map Map with key as outcome value and the value is the display value
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getTaskDefinitionOutcomes

      Map getTaskDefinitionOutcomes(IWorkflowContext context, String taskDefinitionId, String mdsLabel, Locale locale) throws TaskMetadataServiceException
      Get the outcomes for the given task definition. The return value is a Map containing the outcome display values for the specified Locale, keyed by the outcome value. The outcome display values are determined as follows:
      • If the task definition specifies a resource bundle, then the display value will be looked up in Task resource bundle, using the outcome value as a key.
      • If no Task resource bundle is specified, the display value will be looked up in the WorkflowLabels.properties resource bundle using a key of the form TASK_OUTCOME.<OUTCOME VALUE>. This resource bundle will be loaded from the classpath specified in the worklfow configuration parameter workflowCustomClasspathURL, if available. If not available on the custom classpath, resource bundle will be loaded from the HWF services classpath.
      • If a resource string could not be located in a resource bundle, then the display value will be the same as the outcome value.
      Parameters:
      context - The workflow context
      taskDefinitionId - a String value
      mdsLabel - Label associated to this task definition when persisted to mds. Can be null if not available.
      locale - The Locale to use when looking up display strings.
      Returns:
      Map Map with key as outcome value and the value is the display value
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getTaskDefinitionOutcomes

      Map getTaskDefinitionOutcomes(IWorkflowContext context, String taskDefinitionId, Locale locale) throws TaskMetadataServiceException
      Get the outcomes for the given task definition. The return value is a Map containing the outcome display values for the specified Locale, keyed by the outcome value. The outcome display values are determined as follows:
      • If the task definition specifies a resource bundle, then the display value will be looked up in Task resource bundle, using the outcome value as a key.
      • If no Task resource bundle is specified, the display value will be looked up in the WorkflowLabels.properties resource bundle using a key of the form TASK_OUTCOME.<OUTCOME VALUE>. This resource bundle will be loaded from the classpath specified in the worklfow configuration parameter workflowCustomClasspathURL, if available. If not available on the custom classpath, resource bundle will be loaded from the HWF services classpath.
      • If a resource string could not be located in a resource bundle, then the display value will be the same as the outcome value.
      Parameters:
      context - The workflow context
      taskDefinitionId - a String value
      locale - The Locale to use when looking up display strings.
      Returns:
      Map Map with key as outcome value and the value is the display value
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getVersionTrackedAttrs

      List getVersionTrackedAttrs(IWorkflowContext context, Task task) throws TaskMetadataServiceException
      Get the version tracked attributes
      Parameters:
      context - The workflow context
      task - The task object
      Returns:
      List A list of version tracked attributes
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getRestrictedActions

      List getRestrictedActions(IWorkflowContext context, Task task) throws TaskMetadataServiceException
      Get the restricted actions
      Parameters:
      context - The workflow context
      task - The task object
      Returns:
      List A list of restricted actions
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getTaskDisplay

      @Deprecated TaskDisplay getTaskDisplay(IWorkflowContext context, Task task, String applicationName) throws TaskMetadataServiceException
      Deprecated.
      Since 11.1.1.1.0.
      Get the workflow task display
      Parameters:
      context - The workflow context
      task - The task object
      applicationName - The application in whose context is the TaskDisplay URI required
      Returns:
      TaskDisplay The workflow taskDisplay
      Throws:
      TaskMetadataServiceException - For any exception
    • getTaskDisplayRegion

      TaskDisplayRegion getTaskDisplayRegion(IWorkflowContext context, Task task, String applicationName, String regionName) throws TaskMetadataServiceException
      Get a region definition for the given region
      Parameters:
      context - The workflow context
      task - The task object
      applicationName - The application in whose context is the TaskDisplay URI required
      regionName - The region name
      Returns:
      TaskDisplayRegion The TaskDisplayRegion will identify the region type, URL for the region jsp and the parameter map. The parameter map is a map with key as parameter name and the value is the resolved value. The values are specified as XPath expression, those expressions are evaluated to populate this map
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getResourceBundleInfo

      ResourceBundleInfo getResourceBundleInfo(IWorkflowContext context, Task task, Locale locale) throws TaskMetadataServiceException
      Get the resource bundle information
      Parameters:
      context - The workflow context
      task - The task object
      locale - The locale for which to get the resource bundle. This is needed because of some validation done in getting the resource bundle information
      Returns:
      ResourceBundleInfo The ResourceBundleInfo object
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getTaskAttributes

      List getTaskAttributes(IWorkflowContext context) throws TaskMetadataServiceException
      Get a list of TaskAttribute objects for standard task attributes. TaskAttribute objects provide information on attribute type, column name, and user-disaplayable labels, localized to the Locale of the context user, and have the following properties:

      The returned list of TaskAttributeType can be converted to map indexed by category using See TaskAttributesUtil.getTaskAttrCategoryMap(List<TaskAttributeType>)

      Parameters:
      context - The workflow context
      Returns:
      List of TaskAttribute objects
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getTaskAttributesForTaskDefinition

      List getTaskAttributesForTaskDefinition(IWorkflowContext context, String taskDefinitionId) throws TaskMetadataServiceException
      Get a list of TaskAttribute objects that describe standard task attributes and mapped flex-field columns for the specified task definition. TaskAttribute objects provide information on attribute type, column name, and user-disaplayable labels, localized to the Locale of the context user. TaskAttribute has the following properties:

      The returned list of TaskAttributeType can be converted to map indexed by category using See TaskAttributesUtil.getTaskAttrCategoryMap(List<TaskAttributeType>)

      Parameters:
      context - The workflow context
      taskDefinitionId - Id of the task definition to get attributes for
      Returns:
      List of TaskAttribute objects
      Throws:
      TaskMetadataServiceException
    • getTaskAttributesForTaskDefinitions

      List<TaskAttributeType> getTaskAttributesForTaskDefinitions(IWorkflowContext context, List<String> taskDefinitionIds) throws TaskMetadataServiceException
      Get a list of TaskAttribute objects that describe standard task attributes and mapped flex-field columns that are common for the specified task definitions.

      For mapped flex-field columns, only attribute labels that are used by all task definitions specified are returned. For example, if taskDefinitionA uses the flex-field attribute labels "CustomerName" and "POCode", and taskDefinitionB uses the flex-field attribute labels "CustomerName" and "InvoiceID", a request for task attributes for taskDefinitionA and taskDefinitionB will return all the standard attributes, but only the flex-field attribute corresponding to "CustomerName".

      TaskAttribute objects provide information on attribute type, column name, and user-disaplayable labels, localized to the Locale of the context user. TaskAttribute has the following properties:

      The returned list of TaskAttributeType can be converted to map indexed by category using See TaskAttributesUtil.getTaskAttrCategoryMap(List<TaskAttributeType>)

      Parameters:
      context - The workflow context
      taskDefinitionIds - List of taskDefinitionIds to get attributes for
      Returns:
      List of TaskAttribute objects
      Throws:
      TaskMetadataServiceException
    • getTaskAttributesForTaskNamespaces

      List<TaskAttributeType> getTaskAttributesForTaskNamespaces(IWorkflowContext context, List<String> taskNamespaces) throws TaskMetadataServiceException
      Get a list of TaskAttribute objects that describe standard task attributes and mapped flex-field columns that are common for task definitions identified by the specified namespaces.

      The method will attempt to determine the task definitions by looking up the currently active versions of task components that have the specified task namespace. If no active version can be found for a particular namespace, the namespace will be skipped.

      For mapped flex-field columns, only attribute labels that are used by all task definitions specified are returned. For example, if taskDefinitionA uses the flex-field attribute labels "CustomerName" and "POCode", and taskDefinitionB uses the flex-field attribute labels "CustomerName" and "InvoiceID", a request for task attributes for taskDefinitionA and taskDefinitionB will return all the standard attributes, but only the flex-field attribute corresponding to "CustomerName".

      TaskAttribute objects provide information on attribute type, column name, and user-disaplayable labels, localized to the Locale of the context user. TaskAttribute has the following properties:

      The returned list of TaskAttributeType can be converted to map indexed by category using See TaskAttributesUtil.getTaskAttrCategoryMap(List<TaskAttributeType>)

      Parameters:
      context - The workflow context
      taskNamespaces - List of task namespaces to get attributes for
      Returns:
      List of TaskAttribute objects
      Throws:
      TaskMetadataServiceException
    • getTaskVisibilityRules

      Map<String,IPrivilege> getTaskVisibilityRules(IWorkflowContext context, Task task) throws TaskMetadataServiceException
      Get the task visibility rules. This method returns a map with the key being name of the task attribute and value being a IPrivilege object
      The keys in map returned will be one of the following (the value in the brackets are the actual value of the constants)
      1. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_PAYLOAD (PAYLOAD)
      2. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_COMMENTS (COMMENTS)
      3. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_ATTACHMENTS (ATTACHMENTS)
      4. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_HISTORY (HISTORY)
      5. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_FLEXFIELDS (FLEXFIELDS)
      6. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_REVIEWERS (REVIEWERS)
      7. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_ASSIGNEES (ASSIGNEES) - During configuration of the visibility rules, this is configured as ASSIGNEES
      8. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_ASSIGNEE_USERS (ASSIGNEE_USERS) - During configuration of the visibility rules, this is configured as ASSIGNEES
      9. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_ASSIGNEE_GROUPS (ASSIGNEE_GROUPS) - During configuration of the visibility rules, this is configured as ASSIGNEES
      10. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_ACQUIRED_BY (ACQUIRED_BY) - During configuration of the visibility rules, this is configured as ASSIGNEES
      11. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_DATES (All Dates) - During configuration of the visibility rules, this is configured as DATES
      12. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_START_DATE (START_DATE) - During configuration of the visibility rules, this is configured as DATES
      13. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_END_DATE (END_DATE) - During configuration of the visibility rules, this is configured as DATES
      14. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_ASSIGNED_DATE (ASSIGNED_DATE) - During configuration of the visibility rules, this is configured as DATES
      15. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_SYSTEM_END_DATE (SYSTEM_END_DATE) - During configuration of the visibility rules, this is configured as DATES
      16. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_CREATED_DATE (CREATED_DATE) - During configuration of the visibility rules, this is configured as DATES
      17. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_EXPIRATION_DATE (EXPIRATION_DATE) - During configuration of the visibility rules, this is configured as DATES
      18. ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_ALL_UPDATED_DATE (ALL_UPDATED_DATE) - During configuration of the visibility rules, this is configured as DATES
      19. Message attribute names prefixed with ITaskMetadataService.TASK_VISIBILITY_ATTRIBUTE_PAYLOAD_MESSAGE_ATTR_PREFIX (PAYLOAD.)
      This method will return an empty map if there are no task visibility attribute rules defined
      Parameters:
      context - The workflow context containing the user whose privileges is begin queried for
      task - The task for which the visibility rules is begin queried for
      Returns:
      a Map value. This method will return an empty map if there are no task visibility attribute rules defined
      Throws:
      TaskMetadataServiceException - if an error occurs
    • getTaskVisibilityRules

      Map<String,IPrivilege> getTaskVisibilityRules(IWorkflowContext context, String taskId) throws TaskMetadataServiceException
      Get the task visibility rules. The behavior is the same as the overloaded method that takes the task object.
      Parameters:
      context - The workflow context containing the user whose privileges is begin queried for
      taskId - The task for which the visibility rules is begin queried for
      Returns:
      a Map value. This method will return an empty map if there are no task visibility attribute rules defined
      Throws:
      TaskMetadataServiceException - if an error occurs
      See Also:
    • getComponentTopicDocumentations

      List<oracle.bpel.services.workflow.metadata.processDocumentation.model.TopicDocumentationType> getComponentTopicDocumentations(IWorkflowContext context, String compositeDN, String componentName, String topicName, oracle.bpel.services.workflow.metadata.processDocumentation.model.DocumentationAudienceEnum documentationAudience, Locale locale) throws TaskMetadataServiceException
      Get the list of TopicDocumentation objects for the specified Component of the composite, topicName, documentationAudience and locale
      Parameters:
      context - The workflow context
      compositeDN - The compositeDN of the process
      componentName - The component name
      topicName - The topic name
      documentationAudience - The enum for documentation audience type
      locale - The locale of the audience user
      Returns:
      The list of TopicDocumentation objects for the specified Component of the composite, topicName, documentationAudience and locale
      Throws:
      TaskMetadataServiceException
    • containsComponentTopicDocumentations

      boolean containsComponentTopicDocumentations(IWorkflowContext context, String compositeDN, String componentName, String topicName, oracle.bpel.services.workflow.metadata.processDocumentation.model.DocumentationAudienceEnum documentationAudience, Locale locale) throws TaskMetadataServiceException
      Returns if the given Component in the composite contains TopicDocumentation objects in the specified topicName, documentationAudience and locale
      Parameters:
      context - The workflow context
      compositeDN - The compositeDN of the process
      componentName - The component name
      topicName - The topic name
      documentationAudience - The enum for documentation audience type
      locale - The locale of the audience user
      Returns:
      true if the given Component in the composite contains TopicDocumentation objects in the specified topicName, documentationAudience and locale
      Throws:
      TaskMetadataServiceException
    • getTaskTopicDocumentations

      List<oracle.bpel.services.workflow.metadata.processDocumentation.model.TopicDocumentationType> getTaskTopicDocumentations(IWorkflowContext context, String taskId, String topicName, oracle.bpel.services.workflow.metadata.processDocumentation.model.DocumentationAudienceEnum documentationAudience, Locale locale) throws TaskMetadataServiceException
      Get the list of TopicDocumentation objects for the specified Human task, topicName, documentationAudience and locale
      Parameters:
      context - The workflow context
      taskId - The task id
      topicName - The topic name
      documentationAudience - The enum for documentation audience type
      locale - The locale of the audience user
      Returns:
      The list of TopicDocumentation objects for the specified Human task, topicName, documentationAudience and locale
      Throws:
      TaskMetadataServiceException
    • containsTaskTopicDocumentations

      boolean containsTaskTopicDocumentations(IWorkflowContext context, String taskId, String topicName, oracle.bpel.services.workflow.metadata.processDocumentation.model.DocumentationAudienceEnum documentationAudience, Locale locale) throws TaskMetadataServiceException
      Returns if the given Human task contains TopicDocumentation objects in the specified topicName, documentationAudience and locale
      Parameters:
      context - The workflow context
      taskId - The task id
      topicName - The topic name
      documentationAudience - The enum for documentation audience type
      locale - The locale of the audience user
      Returns:
      true if the given Human task contains TopicDocumentation objects in the specified topicName, documentationAudience and locale
      Throws:
      TaskMetadataServiceException
    • getSummaryFieldDefinition

      SummaryFieldsType getSummaryFieldDefinition(IWorkflowContext context, String taskDefinitionId) throws TaskMetadataServiceException
      Get Summary Field Metadata for standard and flexfield mapping. Summary Field Metadata contains info about the mapping between Summary Field and Flex Field or Summary Field and Standard Fields such as Title, Priority. Summary Field can only be mapped to a pre-definied list of Task standard fields defined in WorkflowConfiguration.xsd
      Parameters:
      context - IWorkflowContext
      taskDefinitionId -
      Returns:
      SummaryFieldsType
      Throws:
      TaskMetadataServiceException
    • getProjectResourceBundle

      ResourceBundle getProjectResourceBundle(IWorkflowContext ctx, String taskDefinitionId, String mdsLabel, Locale locale) throws TaskMetadataServiceException
      Returns the Resource Bundle for given task definiton id and locale.
      Parameters:
      ctx - The workflow context
      taskDefinitionId - The task definition id
      mdsLabel - The mds label
      locale - The locale of the user
      Returns:
      Resource Bundle
      Throws:
      TaskMetadataServiceException
    • getListOfConfiguredLocales

      List<Locale> getListOfConfiguredLocales(IWorkflowContext ctx) throws TaskMetadataServiceException
      Throws:
      TaskMetadataServiceException
    • getFilteredDeployedCategories

      List<oracle.bpel.services.workflow.metadata.category.DeployedCategory> getFilteredDeployedCategories(IWorkflowContext context, List<String> packageNames) throws TaskMetadataServiceException
      Code changes for ENH 33721355 - GETDEPLOYEDCATEGORIES SHOULD RETURN FAMILY NAME ALONG WITH CATEGORY VALUES This new API will return list of DeployedCategory objects which will contain composite, taskDefinition, categoryName, familyName ,categoryDisplayName ,compositeVersion. This API is designed in similar line of existing API getDeployedCategories() with additional support of filtering the active composites based on the list of packagenames(values like : hcm, scm, fin ).
      Parameters:
      context -
      packageNames -
      Returns:
      List of DeployedCategory
      Throws:
      TaskMetadataServiceException
    • getAllDeployedCategories

      List<oracle.bpel.services.workflow.metadata.category.DeployedCategory> getAllDeployedCategories(IWorkflowContext context) throws TaskMetadataServiceException
      Code changes for Enh 34902989 - Need an API which returns details of all tasks from deployed composites in FA envs This new API will return list of DeployedCategory objects which will contain composite, taskDefinition, categoryName, familyName ,categoryDisplayName ,compositeVersion. This API is designed in similar line of existing API getFilteredDeployedCategories() without filter on packagename. Unlike getFilteredDeployedCategories, this API will return null category values as well.
      Parameters:
      context -
      Returns:
      List of DeployedCategory
      Throws:
      TaskMetadataServiceException