...
For example, enabling/disabling the auditing or duplicate check activities will not affect the request workflow. But, controlling the activities like entitlement, client response etc. will affect the request workflow cycle.
The following snippet shows you the complete JSON structure of the CanvasFrameworkJson.json file that controls the Request Modeler base activities:
Code Block | ||
---|---|---|
| ||
{ "model": { "id": "DATA_MAINT_FRAMEWORK", "description": "State Model that defines the states for a typical Data Maintenance application", "imageUrl": "/images/dataMaint.png", "version": "1.0", "bundle": "maintenance", "globals": { "evaluators": [ { "id": "equals", "imageUrl": "images/activities/equals.png", "class": "com.intellectdesign.canvas.rules.impl.EqualsEvaluator" } ], "activities": [ { "id": "deriveProductSubProdFunction", "imageUrl": "images/activities/deriveProductSubProdFunction.png", "class": "com.intellectdesign.canvas.reqmodel.activity.base.ReqModelDerivePSFDataActivity" }, { "id": "transformDataClientToServer", "imageUrl": "images/activities/transformDataClientToServer.png", "class": "com.intellectdesign.canvas.reqmodel.activity.base.ReqModelDataTransformationActivity" }, { "id": "preProcessData", "imageUrl": "images/activities/preProcessData.png", "class": "com.intellectdesign.canvas.reqmodel.activity.base.ReqModelSetSystemFieldsActivity" }, { "id": "deriveKeysForTransaction", "imageUrl": "images/activities/deriveKeysForTransaction.png", "class": "com.intellectdesign.canvas.reqmodel.activity.base.ReqModelKeyGenerationActivity" }, { "id": "preProcessingChecks", "imageUrl": "images/activities/preProcessingChecks.png", "class": "com.intellectdesign.canvas.reqmodel.activity.base.ReqModelEntitlementChecksActivity" }, { "id": "performDuplicateChecks", "imageUrl": "images/activities/performDuplicateChecks.png", "class": "com.intellectdesign.canvas.reqmodel.activity.base.ReqModelDuplicateCheckActivity" }, { "id": "executeStateEngine", "imageUrl": "images/activities/executeStateEngine.png", "class": "com.intellectdesign.canvas.reqmodel.activity.base.ReqModelStateEngineExecutor" }, { "id": "raiseEvent", "imageUrl": "images/activities/raiseEvent.png", "class": "com.intellectdesign.canvas.reqmodel.activity.base.ReqModelAuditingActivity" }, { "id": "publishToHost", "imageUrl": "images/activities/publishToHost.png", "class": "com.intellectdesign.canvas.reqmodel.activity.base.ReqModelPublishToHostActivity" }, { "id": "prepareResponse", "imageUrl": "images/activities/prepareResponse.png", "class": "com.intellectdesign.canvas.reqmodel.activity.base.ReqModelPrepareClientResponse" } ], "errorHandlers": { "invalidState": { "activityChain": [ { "id": "CT.INVSTATE", "type": "set", "context": { "error": "true" }, "response": { "processingStatus": "failure", "errorCodes": [ "ERR_INVALID_STATE" ], "errorMessages": [ "$ctbundle.ERR_INVALID_STATE" ] } } ] }, "invalidAction": { "activityChain": [ { "id": "CT.INVACTION", "type": "set", "context": { "error": "true" }, "response": { "processingStatus": "failure", "errorCodes": [ "ERR_INVALID_ACTION" ], "errorMessages": [ "$ctbundle.ERR_INVALID_ACTION" ] } } ] }, "exception": { "activityChain": [ { "id": "CT.EXCEPTION", "type": "set", "context": { "error": "true", "propagateException": "true" }, "response": { "processingStatus": "failure", "errorCodes": [ "SYSERROR" ], "errorMessages": [ "$ctbundle.SYSERROR" ] } } ] } } }, "states": [ { "id": "CANVAS_STATE", "description": "InitialState", "isDefault": "true", "actions": [ { "id": "CANVAS_ACTION", "description": "When a new request is submitted for pre confirmation", "transactionRequired": "true", "isInEditMode": true, "activityChain": [ { "id": "A01", "type": "deriveProductSubProdFunction" }, { "id": "A02", "type": "transformDataClientToServer" }, { "id": "A03", "type": "preProcessData" }, { "id": "A04", "type": "deriveKeysForTransaction" }, { "id": "A05", "type": "preProcessingChecks" }, { "id": "A06", "type": "performDuplicateChecks" }, { "id": "A07", "type": "executeStateEngine" }, { "id": "A08", "type": "raiseEvent" }, { "id": "A09", "type": "publishToHost" }, { "id": "A10", "type": "prepareResponse" } ] } ] } ] } } |
...
- The highlighted (blue) JSON code in the above code snippet should be deleted to disable it completely from the Canvas framework side.
- In the stateModelLibrary.json, insert the highlighted (green) JSON code as shown in the following snippet to enable the auditing only for the specific activity.
Code Block | ||
---|---|---|
| ||
{ "id": "DELETE", "description": "Delete the request", "transactionRequired": "true", "activityChain": [ { "id": "IN_DE_CHK", "type": "rule", "condition": { "id": "equals", "field": "$context.LIVE_MODE", "value": "DELETE" }, "success": { "activityChain": [ { "id": "IN_DA", "type": "moveToState", "state": "DA" }, { "id": "IN_DA1", "type": "raiseevent" } ] }, "failure": { "activityChain": [ { "id": "IN_DE", "type": "moveToState", "state": "DE" } ] } } ] } |
...