See: Description
Interface | Description |
---|---|
IDfLifecycleAction |
Interface for a Java method implementing a system-defined action to be taken on entering
a lifecycle state.
|
IDfLifecycleUserAction |
Interface for a Java method implementing user defined actions to be taken on entering
a Lifecycle state.
|
IDfLifecycleUserEntryCriteria |
Interface for a Java method implementing user defined entry criteria for a Lifecycle.
|
IDfLifecycleUserPostProcessing |
Interface for a Java method implementing user defined actions to be taken after
an object has changed Lifecycle state.
|
IDfLifecycleValidate |
Interface for a Java method implementing user defined validation on a Lifecycle
before it can be installed.
|
Provides interfaces for defining logic on lifecycles. This logic falls into two primary categories. The first category pertains to state changes that occur on documents attached to lifecycles, the second is validation of the lifecycle prior to its use.
The following interfaces pertain to state changes:
The interface IDfLifecycleValidate is used to verify the lifecycle definition is valid prior to installing it.
The following example code demonstrates how to establish a session and create a document:
public class PublishedState implements IDfLifecycleUserEntryCriteria, IDfLifecycleUserAction, IDfLifecycleUserPostProcessing, IDfModule { private boolean isReviewSignedOff (IDfSysObject obj) throws DfException { IDfQuery query = new DfQuery(); query.setDQL ("select user_name from dm_audittrail " + "where event_name = 'dm_signoff' and " + "audited_obj_id = '" + obj.getObjectId().toString() + "' and " + "string_2 = 'REVIEWED'"); IDfCollection collection = query.execute (obj.getSession(), DfQuery.DF_READ_QUERY); boolean result = collection.next(); collection.close(); return result; } private void publishSignOff (IDfSysObject obj, String userName) throws DfException { obj.signoff (userName, "", "PUBLISHED"); } public boolean userEntryCriteria(IDfSysObject obj, String userName, String targetState) throws DfException { return isReviewSignedOff (obj); } public void userAction(IDfSysObject obj, String userName, String targetState) throws DfException { obj.mark ("PUBLISHED"); } public void userPostProcessing (IDfSysObject obj, String userName, String targetState) throws DfException { publishSignOff (obj, userName); } }
Copyright 1994-2023 OpenText Corporation. All rights reserved.