Process Target
The process target starts a process whenever an automation fires. Use it to run a loader, calculation or other workflow as soon as the data it depends on arrives, without polling or waiting for a schedule.
| Id | Name | Template | Icon |
|---|---|---|---|
odsl.process | Run a process | run [process] | play-fill text-success |
The target works with any service and any action. It supports property-change filtering but not @transformer.
Inputs​
| Input | Description |
|---|---|
process | The name of the process to run |
How it works​
- The process named in
processis started, and runs as the process's own run-as user - The triggering data and the automation properties are passed to the process
- The process's own input values are merged into the triggering data passed to the process
- The automation properties include
idand, when there is one,ondateof the triggering item
Example: run a process when a dataset is complete​
- ODSL
- REST API
a = AutomationBuilder("dataset", "private", "MY.PROVIDER.FEED").build()
c = SimpleObject()
c.source = "private"
c.service = "dataset"
c.id = "MY.PROVIDER.FEED"
c.action = "complete"
conds = []
conds.add(c)
a.conditions = conds
a.target = "odsl.process"
a.template = "When 'MY.PROVIDER.FEED' is complete, run [process]"
a.icon = "play-fill text-success"
a.properties.process = "MY_ENRICHMENT_PROCESS"
a.enabled = true
save ${automation:a}
POST https://api.opendatadsl.com/api/automation/v1
{
"target": "odsl.process",
"template": "When 'MY.PROVIDER.FEED' is complete, run [process]",
"icon": "play-fill text-success",
"enabled": true,
"conditions": [
{
"source": "private",
"service": "dataset",
"id": "MY.PROVIDER.FEED",
"action": "complete"
}
],
"properties": {
"process": "MY_ENRICHMENT_PROCESS"
}
}
Example: run a process when a curve is updated​
- ODSL
- REST API
a = AutomationBuilder("data", "private", "MY_OBJECT:CURVE").build()
c = SimpleObject()
c.source = "private"
c.service = "data"
c.id = "MY_OBJECT:CURVE"
c.action = "update"
conds = []
conds.add(c)
a.conditions = conds
a.target = "odsl.process"
a.template = "When 'MY_OBJECT:CURVE' is updated, run [process]"
a.icon = "play-fill text-success"
a.properties.process = "MY_RISK_CALCULATION"
a.enabled = true
save ${automation:a}
POST https://api.opendatadsl.com/api/automation/v1
{
"target": "odsl.process",
"template": "When 'MY_OBJECT:CURVE' is updated, run [process]",
"icon": "play-fill text-success",
"enabled": true,
"conditions": [
{
"source": "private",
"service": "data",
"id": "MY_OBJECT:CURVE",
"action": "update"
}
],
"properties": {
"process": "MY_RISK_CALCULATION"
}
}
Process or script?
Use the process target when you want the run tracked as a process execution with its own run-as user and inputs. For a lightweight response that only needs a single script, use the Script Target.
Related pages​
- Automation Basics: how automations work, conditions and templates
- Creating Automations: step-by-step guide to setting up automations
- Script Target: run a single ODSL script instead of a process
- Custom Targets: fix the process name in a target for your team
- Automation Targets: overview of all available targets