All Downloads are FREE. Search and download functionalities are using the official Maven repository.

api.decision.api Maven / Gradle / Ivy

There is a newer version: 3.0.4
Show newest version
[ The Decision Process api is used to manage and control decision processes and decision packets. ]

api(Decision) {

    [Returns all workflow definitions]
    @entitle=/decision/read
    @public List getAllWorkflows();

    [Returns a list of full display names of the paths below this one. Ideally optimized depending on the repo.]
    @entitle=/decision/read
    @public List(RaptureFolderInfo) getWorkflowChildren(String workflowURI);

    [Return a list of full display names of the paths below this one. Ideally optimized depending on the repo.]
    @entitle=/decision/read
    @public List(RaptureFolderInfo) getWorkOrderChildren(String parentPath);

    [Create or update a workflow to contain only the specified nodes and transitions.]
    @entitle=/decision/write
    @public void putWorkflow(Workflow workflow);

    [Returns a workflow definition, or null if not found.]
    @entitle=/decision/read/$f(workflowURI)
    @public Workflow getWorkflow(String workflowURI);

    [Returns a step definition, or null if not found]
    @entitle=/decision/read/$f(stepURI)
    @public Step getWorkflowStep(String stepURI); //this is a workflow uri plus step, e.g. workflow://my/workflow#step1

    [Gets the category associated with a step. This is the step's own categoryOverride, if present, or otherwise the category associated with the entire workflow.]
    @entitle=/decision/read/$f(stepURI)
    @public String getStepCategory(String stepURI);

    [Adds a new step to an existing workflow initially containing the specified transitions]
    @entitle=/decision/write/$f(workflowURI)
    @public void addStep(String workflowURI, Step step);

    [Removes a step from a workflow.]
    @entitle=/decision/write/$f(workflowURI)
    @public void removeStep(String workflowURI, String stepName);

    [Adds a new Transition to a workflow.]
    @entitle=/decision/write/$f(workflowURI)
    @public void addTransition(String workflowURI, String stepName, Transition transition);

    [Removes a transition from a workflow.]
    @entitle=/decision/write/$f(workflowURI)
    @public void removeTransition(String workflowURI, String stepName, String transitionName);

    [Deletes a workflow.]
    @entitle=/decision/write/$f(workflowURI)
    @public void deleteWorkflow(String workflowURI);
    
    [Creates and executes a workflow.
    If there is a defaultAppStatusUriPattern set for this Workflow then it will be used for the appstatus URI.
    Otherwise, no appstatus will be created.
    TODO make workOrderURI format align with permission checks.]
    @entitle=/decision/execute/$f(workflowURI)
    @public String createWorkOrder(String workflowURI, Map argsMap);

    [Creates and executes a workflow. Same as createWorkOrder, but the appStatusUriPattern is passed as an explicit argument instead of using the default appStatusUriPattern (if one has been set).
    Note that the app status allows the Workflow and its output to be accessed via the web interface; workflows without an app status are not accessible in this way. ]
    @entitle=/decision/execute/$f(workflowURI)
    @public CreateResponse createWorkOrderP(String workflowURI, Map argsMap, String appStatusUriPattern);

    [Releases the lock associated with this WorkOrder. This method should only be used by admins, in case there
    was an unexpected problem that caused a WorkOrder to finish or die without releasing the lock.]
    @entitle=/decision/admin
    @public void releaseWorkOrderLock(String workOrderURI);

    [Gets the status of a workOrder]
    @entitle=/decision/read/$f(workOrderURI)
    @public WorkOrderStatus getWorkOrderStatus(String workOrderURI);

    [Writes an audit entry related to a workOrder. Messages may be INFO or ERROR based on the boolean fourth parameter]
    @entitle=/decision/write/$f(workOrderURI)
    @public void writeWorkflowAuditEntry(String workOrderURI, String message, Boolean error);

    [Gets the WorkOrder objects starting on a given day. Orders that carried over from the previous day are not included. ]
    @entitle=/decision/read
    @public List getWorkOrdersByDay(Long startTimeInstant);

    [Gets the top-level status object associated with the work order]
    @entitle=/decision/read/$f(workOrderURI)
    @public WorkOrder getWorkOrder(String workOrderURI);

    [Get the worker]
    @entitle=/decision/read/$f(workOrderURI)
    @public Worker getWorker(String workOrderURI, String workerId);

    [Requests cancellation of a work order. This method returns immediately once the cancellation is recorded, but the individual workers may continue for some time before stopping, depending on the type of step being executed.]
    @entitle=/decision/write/$f(workOrderURI)
    @public void cancelWorkOrder(String workOrderURI);

    [Resume work order]
    @entitle=/decision/write/$f(workOrderURI)
    @public CreateResponse resumeWorkOrder(String workOrderURI, String resumeStepURI);

    [Returns true if CancelWorkOrder was called.]
    @entitle=/decision/read/$f(workOrderURI)
    @public Boolean wasCancelCalled(String workOrderURI);

    [Gets details for the cancellation for a workOrder -- or null if not cancelled.]
    @entitle=/decision/read/$f(workOrderURI)
    @public WorkOrderCancellation getCancellationDetails(String workOrderURI);

    [Gets the detailed context information for a work order in progress]
    @entitle=/decision/debug/$f(workOrderURI)
    @public WorkOrderDebug getWorkOrderDebug(String workOrderURI);

    [Defines the IdGen config for work order items.]
    @entitle=/decision/admin
    @public void setWorkOrderIdGenConfig(String config, Boolean force);

    [Sets a literal in the context. The literal value that is stored will be returned after a read.
    The workerURI is a workOrderURI with the element set to the worker ID.]
    @entitle=/decision/write
    @public void setContextLiteral(String workerURI, String varAlias, String literalValue);

    [Set a literal in the context. This means that whatever is stored will be evaluated before being returned, so it must be a valid expression.
    The workerURI is a workOrderURI with the element set to the worker id]
    @entitle=/decision/write
    @public void setContextLink(String workerURI, String varAlias, String expressionValue);

    [Gets a value in the context, as json. The workerURI is a workOrderURI with the element set to the worker id.]
    @entitle=/decision/read
    @public String getContextValue(String workerURI, String varAlias);

    [Adds an error to the context of a particular worker. The workerURI is a workOrderURI with the element set to the worker id]
    @entitle=/decision/write
    @public void addErrorToContext(String workerURI, ErrorWrapper errorWrapper);

    [Gets the errors from the context for a given worker. The workerURI is a workOrderURI with the element set to the worker id.]
    @entitle=/decision/read
    @public List getErrorsFromContext(String workerURI);

    [Get info about any exception(s) thrown during execution of this workorder]
    @entitle=/decision/read
    @public List getExceptionInfo(String workOrderURI);

    [Report status of the step
     - workerURI: the uri of this WorkOrder with the element set to the worker ID
     - stepStartTime: the time when the step being reported started
     - message: a human-friendly message to display
     - progress: how many units are currently complete
     - max: how many units in total would mark this as done
    ]
    @entitle=/decision/read
    @public void reportStepProgress(String workerURI, Long stepStartTime, String message, Long progress, Long max);

    [Gets app statuses by prefix.]
    @entitle=/decision/read
    @public List getAppStatuses(String prefix);

    [Gets detailed app status info by prefix. Also returns any context values requested in the second argument.]
    @entitle=/decision/read
    @public List getAppStatusDetails(String prefix, List extraContextValues);

    [Get any defined average runtimes for the past month for a workflow]
    @entitle=/decision/read
    @public WorkflowHistoricalMetrics getMonthlyMetrics(String workflowURI, String jobURI, String argsHashValue, String state);

    [Get log messages for a workflow. Note: logs get deleted after a certain number of days, so this only retrieves any log messages that are within the
    configured log retention period. If the retention period is before the startTime, an empty response is returned.
    workOrderURI: required
    startTime: required
    endTime: required
    keepAlive: required, milliseconds to keep alive the batch, max 30000
    bufferSize: required, max 100
    nextBatchId: optional, if null start from beginning
    stepName: optional
    stepStartTime: optional, this is a timestamp in a string because of a limitation in Rapture where int or long arguments cannot be null
    ]
    @entitle=/decision/read
    @public LogQueryResponse queryLogs(String workOrderURI, Long startTime, Long endTime, Long keepAlive, Long bufferSize, String nextBatchId,
        String stepName, String stepStartTime);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy