-
-
Notifications
You must be signed in to change notification settings - Fork 172
REST Variables
Akram El Assas edited this page Sep 3, 2024
·
2 revisions
Local variables and global variables values are set before the workflow is started.
With REST variables, you can set values at runtime when you start a workflow.
REST variables cannot be set from the dashboard at the moment. You need to use Wexflow API from your application or through Swagger: http://localhost:8000/
To send variables when starting a workflow, use the following endpoint:
POST http://localhost:8000/api/v1/start-with-variables
Here is a sample payload:
{
"WorkflowId":131,
"Variables":[
{
"Name":"restVar1",
"Value":"C:\\WexflowTesting\\file1.txt"
},
{
"Name":"restVar2",
"Value":"C:\\WexflowTesting\\file2.txt"
}
]
}
Here is a sample workflow:
<Workflow xmlns="urn:wexflow-schema" id="138" name="Workflow_RestVariables" description="Workflow_RestVariables">
<Settings>
<Setting name="launchType" value="trigger" />
<Setting name="enabled" value="true" />
</Settings>
<LocalVariables></LocalVariables>
<Tasks>
<Task id="1" name="FilesLoader" description="Loading files" enabled="true">
<Setting name="file" value="$restVar1" />
<Setting name="file" value="$restVar2" />
</Task>
<Task id="2" name="ListFiles" description="Listing files" enabled="true"></Task>
</Tasks>
</Workflow>
Copyright © Akram El Assas. All rights reserved.
- Installing
- Screenshots
- Docker
- Configuration
- Persistence Providers
- Getting Started
- Android App
- Samples
- Local Variables
- Global Variables
- REST Variables
- Functions
- Cron Scheduling
- Logging
-
Built-in Tasks
- File system tasks
- Encryption tasks
- Compression tasks
- Iso tasks
- Speech tasks
- Hashing tasks
- Process tasks
- Network tasks
- XML tasks
- SQL tasks
- WMI tasks
- Image tasks
- Audio and video tasks
- Email tasks
- Workflow tasks
- Social media tasks
- Waitable tasks
- Reporting tasks
- Web tasks
- Script tasks
- JSON and YAML tasks
- Entities tasks
- Flowchart tasks
- Approval tasks
- Notification tasks
- SMS tasks
- Custom Tasks
- Command Line Client
- RESTful API
- Run from Source