Comments (14)
In your wexflow.xml configuration file there is a section where you can configure your temporary folder. When you run WF and some task creates an output, so output goes to this folder in the format wfId/date/time/task_timestamp. This way, next task in your wf knows where to read files,so the contents of the output files will automatically read and be available for your next task.
from wexflow.
same thing i am wondering about. I have ENVIRONMENT Task, have to pass its setting to HttpGet task. How does that work?
from wexflow.
If you are using custom tasks you can programmatically pass data with Shared Memory or read files, here is link to docs how to read files in the next task: https://github.com/aelassas/wexflow/wiki/Custom-Tasks#files. Look at the comment that result is written to file: https://github.com/aelassas/wexflow/wiki/HttpGet.
from wexflow.
If you are using custom tasks you can programmatically pass data with Shared Memory or read files, here is link to docs how to read files in the next task: https://github.com/aelassas/wexflow/wiki/Custom-Tasks#files. Look at the comment that result is written to file: https://github.com/aelassas/wexflow/wiki/HttpGet.
Thanks for info. what i am not clear about is for any arbitrary activity, how do i know where to look for previous activity outputs and possibly inputs. Is there a contract where every activity has to store this in a well known place?
from wexflow.
On the same issue, the task only returns 4 statuses: Success, Warning, Error, Rejected. Tto get the http return codes like (200,202,304,400,404,500 and more) and the message return from any http verbs (Post, Get, Put, Delete) you'll need to read it from the files ?
P.S. on the page https://github.com/aelassas/wexflow/wiki/Tasks - the link to the HttpPost documentation doesn't show the sample/documentation for the task. it pointing to the main Wiki page.
from wexflow.
Ok, so i want to make a wf that based on a rest variable value, triggers a specific activity. is there a way to do that and example?
Seems like i would need an actitivity that generates a switchvalue based on a rest input
from wexflow.
I think most of the Wexflow project's standard tasks are more like an example, so you can write your own custom tasks. I've written an example of a simple custom task to get the response from the HTTP code and write it to a file. Here is a link GitHub The status of the task has nothing to do with the status of the HTTP response code, but you can create a custom task that will fail if the HTTP response, for example, is 400 or something like that.
from wexflow.
For the another question I'm not quite understand what is "rest input". If you want to make a request and execute some specific task based on response, you can do it in one custom task, or create one which returns boolean or switch condition, if you want to use if/while switch.
To do so just add boolean or switch condition to TaskStatus: return new TaskStatus(Status.Success , false);
from wexflow.
For the another question I'm not quite understand what is "rest input". If you want to make a request and execute some specific task based on response, you can do it in one custom task, or create one which returns boolean or switch condition, if you want to use if/while switch. To do so just add boolean or switch condition to TaskStatus: return new TaskStatus(Status.Success , false);
I wanted the input to the rest call to determine the switch output, so i could redirect the flow accordingly.
from wexflow.
For the another question I'm not quite understand what is "rest input". If you want to make a request and execute some specific task based on response, you can do it in one custom task, or create one which returns boolean or switch condition, if you want to use if/while switch. To do so just add boolean or switch condition to TaskStatus: return new TaskStatus(Status.Success , false);
I wanted the input to the rest call to determine the switch output, so i could redirect the flow accordingly.
Input or output, still fuzzy for me. You want a custom task that accepts some parameters like make POST request to this URL and make a switch output. Smth like that?
from wexflow.
For the another question I'm not quite understand what is "rest input". If you want to make a request and execute some specific task based on response, you can do it in one custom task, or create one which returns boolean or switch condition, if you want to use if/while switch. To do so just add boolean or switch condition to TaskStatus: return new TaskStatus(Status.Success , false);
I wanted the input to the rest call to determine the switch output, so i could redirect the flow accordingly.
Input or output, still fuzzy for me. You want a custom task that accepts some parameters like make POST request to this URL and make a switch output. Smth like that?
I am trying to set the CommentType on a comment. From that state, i want a rule that says for state A, set CommentState To some value, for TYpe B, CommentState = another value.
from wexflow.
I ended up writting a function that checks for rest, then local, then settings when a task runs.
Clean as i can set variables at workflow level or get some from the rest call.
from wexflow.
Can you share ?
from wexflow.
@shaibarlev
public static string GetWorkflowVariableValue(this Wexflow.Core.Task task, string variableName, string defaultValue = null)
{
if (task == null)
throw new ArgumentException("Null task");
var workflow = task.Workflow;
if (workflow == null) throw new ArgumentNullException("Null Workflow");
var val = workflow.RestVariables.SingleOrDefault(r => r.Key == variableName)?.Value
?? workflow.LocalVariables.SingleOrDefault(v => v.Key == variableName)?.Value ??
task.GetSetting(variableName, null) ?? workflow.GlobalVariables.SingleOrDefault(g => g.Key == variableName)?.Value
?? Environment.GetEnvironmentVariable(variableName);
if (val == null && string.IsNullOrEmpty(val))
{
return defaultValue;
}
return val;
}
from wexflow.
Related Issues (20)
- Discussion - Visual Editor HOT 2
- thread.abort is obsolete, runtime throw PlatformNotSupportedException HOT 1
- The current process engine is designed to be volatile and lacks persistence processing for running processes
- Adding dependencies to custom tasks
- Required information
- Is this project under the .NET Foundation? HOT 1
- Error ConnectionString in Helper.cs in PostgreSQL HOT 8
- Localization support HOT 2
- Docker installation fails on Windows 11, WSL 2 HOT 2
- start muti wexflow server HOT 1
- Microsoft.Extensions.Hosting.WindowsServices net core HOT 1
- update net 8 HOT 1
- Task timeout and Task retries HOT 5
- Does not compile under visual studio 2022 HOT 5
- Getting my task to appear and add to designer. HOT 3
- Question HOT 1
- Replacement strings in HTTP Tasks
- Custom task not showing HOT 4
- Ability to perform CSS or XPATH queries on HTML Page Data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wexflow.