Rascal activites for worksmith
npm install worksmith_rascalRascal activities for worksmith
This package contains the following activities/tasks:
name | description
--- | ---
publish | Publishes a message a rascal publication
receiveOne | Receives a message from a rascal publication
##### example
``javascript`
var worksmith = require('worksmith')
worksmith.use('rascal', require('worksmith_rascal'))
var workflow = worksmith({task:"sequence", items : [{
task:'rascal/publish',
broker: '@broker',
publication: 'p1',
payload: 'test message',
resultTo: 'messageId'
}])
When a message is received the result is { message: rabbitMsg, content: parsed
##### params
name | type | description
--- | --- | ---
broker | Rascal Broker | Will look in context.broker if not specified
subscription | Subscription id | Rascal subscription name to receive from
timeOut | milliseconds | amount of time to wait for a message
options | Other subscription options (see rascal documentation)
##### example
`javascript`
var worksmith = require('worksmith')
worksmith.use('rascal', require('worksmith_rascal'))
var workflow = worksmith({task:"sequence", items : [{
task:'rascal/receiveOne',
broker: '@broker',
subscription: 's1',
resultTo: 'message'
}])
docker-compose up`` in the route of this project.