Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
readme update for 0.6.1
Browse files Browse the repository at this point in the history
trace statements for profiling user code
  • Loading branch information
aclavio committed Jun 23, 2020
1 parent bf85ab2 commit 49bd238
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ State Conductor flows are defined using a subset of [Amazon States Language (ASL

The _State Conductor_ can be used to perform an arbitrary number of context-based processing actions on a subset of documents. Actions could include: invoking a [MarkLogic Data Hub](https://docs.marklogic.com/datahub/) flow, transforming a document, applying metadata, or calling an external process.

The _State Conductor_ requires a "Driver" to process documents and move them through the installed Flows' states. The _State Conductor_ currently (release 0.6.0) supports a [CoRB2](https://github.com/marklogic-community/corb2) driver, [Data Services](https://github.com/aclavio/marklogic-state-conductor/tree/develop/state-conductor-dataservices) driver and [CPF](https://docs.marklogic.com/guide/cpf) driver.
The _State Conductor_ requires a "Driver" to process documents and move them through the installed Flows' states. The _State Conductor_ supports a [Data Services](https://github.com/aclavio/marklogic-state-conductor/tree/develop/state-conductor-dataservices) driver, a [CoRB2](https://github.com/marklogic-community/corb2) driver, and a [CPF](https://docs.marklogic.com/guide/cpf) driver.

1. [Installation](#installation)
2. [Usage](#usage)
Expand Down Expand Up @@ -36,8 +36,8 @@ repositories {
}
}
dependencies {
mlBundle "com.marklogic:marklogic-state-conductor:0.6.0"
mlBundle "com.marklogic:marklogic-state-conductor-cpf:0.6.0" // if using the cpf driver
mlBundle "com.marklogic:marklogic-state-conductor:0.6.1"
mlBundle "com.marklogic:marklogic-state-conductor-cpf:0.6.1" // if using the cpf driver
}
```

Expand Down Expand Up @@ -206,10 +206,10 @@ New (optional) temporal parameters `startDate` and `endDate` in v0.3.0.

## Roadmap <a name="roadmap"></a>

- 0.6.0+
- 0.7.0+
- DHS support
- Full support for Choice Rules
- Batch support
- Retention Policy for job documents
- Flush out the validator and validate flow files on deployment
- Support for Parallel and Map states
- Support for Retries
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,9 @@ function transition(jobDoc, jobObj, stateName, state, flowObj, save = true) {
if (jobObj.flowStatus === FLOW_STATUS_WAITING) {
xdmp.trace(TRACE_EVENT, `transition wait: ${stateName}`);

let pro = JSON.parse(JSON.stringify(jobObj.currentlyWaiting));
pro['doneNextTaskTime'] = pro['nextTaskTime'];
delete pro['nextTaskTime'];
let pro = JSON.parse(JSON.stringify(jobObj.currentlyWaiting));
pro['doneNextTaskTime'] = pro['nextTaskTime'];
delete pro['nextTaskTime'];

jobObj.provenance.push({
date: new Date().toISOString(),
Expand Down Expand Up @@ -927,6 +927,7 @@ function executeStateByJobDoc(jobDoc, save = true) {
* @returns the action module's resposne
*/
function executeActionModule(modulePath, uri, params, context, { database, modules }) {
const startTime = xdmp.elapsedTime();
let resp = invokeOrApplyFunction(
() => {
declareUpdate();
Expand All @@ -946,6 +947,10 @@ function executeActionModule(modulePath, uri, params, context, { database, modul
modules: modules ? modules : xdmp.modulesDatabase(),
}
);
xdmp.trace(
TRACE_EVENT,
`Action module "${modulePath}" completed in ${xdmp.elapsedTime().subtract(startTime)}`
);
return fn.head(resp);
}

Expand All @@ -960,6 +965,7 @@ function executeActionModule(modulePath, uri, params, context, { database, modul
* @returns boolean response of the module
*/
function executeConditionModule(modulePath, uri, params, context, { database, modules }) {
const startTime = xdmp.elapsedTime();
let resp = invokeOrApplyFunction(
() => {
const conditionModule = require(modulePath);
Expand All @@ -982,6 +988,10 @@ function executeConditionModule(modulePath, uri, params, context, { database, mo
modules: modules ? modules : xdmp.modulesDatabase(),
}
);
xdmp.trace(
TRACE_EVENT,
`Condition module "${modulePath}" completed in ${xdmp.elapsedTime().subtract(startTime)}`
);
return fn.head(resp);
}

Expand Down

0 comments on commit 49bd238

Please sign in to comment.