Dalet Flex documentation has moved!
This page is no longer actively maintained. For the latest documentation, please visit us at our new support portal: https://support.dalet.com

Executing Jobs Using Flex Objects

See https://github.com/dalet-oss/flex-jefexampleexecutor-service/blob/master/Service/src/main/java/com/ooyala/flex/jefexampleexecutor/actions/impl/flexapi

See https://github.com/dalet-oss/flex-jefexampleexecutor-service/tree/master/Service/src/main/java/com/ooyala/flex/jefexampleexecutor/actions/impl/assetcontext

Assets and Non-Assets on Execution

Enterprise allows you to run jobs using any object in Flex, including user defined objects (UDO). For example: create a job using a user defined object (UDO); run a JEF job on a UDO in the same way as in Enterprise. The plugin developer must fetch information about the object being used before the job is executed, which can be done using FlexObjectReference.

  • In ActionExecutor you can obtain the flexObjectReferences attribute, from which you can get an instance of the FlexObjectReference:
    • id: The ID of the object (e.g. UDO id)
    • uuid: the uuid of the object (e.g. UDO uuid)
    • objectType: the object type name (e.g. user-defined-objects)

The plugin developer can use this information to learn more about the object by accessing the Enterprise REST API.

Flex Groups, Package and Project members on Execution: one job per member

JEF allows you to execute one job per member in a group or package asset, or against individual members of a group or package. To support this, JEF includes:

  • groupExecutionSupported: executing against the group
  • groupMemberExecutionSupported: executing against each of the individual group members.

To run an action against members of a group asset (for example, smoke receiving a group asset), you must initiate groupMemberExecutionSupported from a workflow, or the power bar in Enterprise, for example using * as hierarchy context in the ActionConfig of the workflow action node.

When groupMemberExecutionSupported is enabled and a group or package asset selected to execute a job, Enterprise expands a workflow action job from group or package members into multiple jobs, which raises a number of jobs in JEF. JEF then processes these jobs independently, regardless of whether they belong to the same group or package of jobs in Enterprise.

Example:

public class AsyncSmokeActionTypeConfiguration extends ActionTypeConfiguration {

    public AsyncSmokeActionTypeConfiguration() {

        runRuleExpression = "#{mioObject.entity instanceof T(tv.nativ.mio.enterprise.asset.MioAsset)
                             && !mioObject.deleted}";
        workflowSupported = true;
        referenceNameSupported = false;
        manualLaunchSupported = true;
        groupExecutionSupported = true;
        groupMemberExecutionSupported = true;
    }
}

Flex Groups, Package and Project members on Execution: one job with all members

JEF allows you to execute a single job with all members in a group or package asset. To support this, JEF includes conventional assetContext: Example:

@ConfigField(displayName = "Asset Context Hierarchy", required = true,
             description = "Expression to reference child assets on the hierarchy of the asset")
private String assetContext;

Selecting Asset children using Hierarchy Context

You can use JEF to execute jobs against a selection of children for Asset hierarchy context. For example, use any of the following expressions to select specific children:

'*/COPY' or './COPY'
'*/PROXY' or './PROXY'
'*/INGEST' or './INGEST'
'*/TRANSCODE[0]' or './TRANSCODE[0]'
'..' will execute a job against the parent asset

When multiple children are selected, Enterprise raises a number of jobs in JEF. JEF then processes these jobs independently, regardless of whether they belong to the same job in Enterprise.