Comments (7)
Granted this is not the direct answer to your the issue, but traditionally speaking if you want to communicate with an external system you'd use a ServiceTask
. In SpiffArena ServiceTask
s are driven by the concept of a Connector Proxy
which is some externally hosted system that conforms to a protocol that provides information about what communication channels are supported and executes those communication requests. Each connector proxy can have several commands. For this particular example it sounds like our http/{Get,Post}
connectors may work. If not a custom connector could be written. For some examples we have:
These connectors can range from very generic (http/GetRequest) to hyper specific (xero/CreateInvoice) depending on the use cases.
from spiff-arena.
Also here is a sample bpmn file that uses service tasks, script tasks and has some unit tests.
from spiff-arena.
-
My use-case: I'm using requests to actively check if an API is working correctly. This system is read-only, and I have no control over it. Another simple use-case is using a simple API to get a random number from https://www.random.org/clients/http/api/.
-
On connectors: Do you have any documentation on how the connectors work? I've read what's available, but I wouldn't know where to start. It also seems a bit overkill to what I want to do.
-
If I was going to make changes to my own Fork of spiff-arena, where would I have to make changes so importing is allowed? I have tried searching this repo for "Import not allowed", but couldn't find any reference.
from spiff-arena.
The documentation is a bit light in this area, but we do have a walk through for deploying a connector proxy as an aws lambda function - https://github.com/jbirddog/connector-proxy-lambda-demo/blob/main/deploy-integrate.md
If that route does not appeal to you then any other deployment would work. Your first use case seems to align well with the http/GetRequest
.
If you want to continue to use a script task and import requests, @burnettk opened a pr to allow disabling the restricted python set up, which would allow you to import from within script tasks.
from spiff-arena.
@ManuelLevi yeah, definitely check out the hot doc @jbirddog linked and especially the section on integrating with SpiffArena for more details about how to interact with a connector proxy that is deployed. i think you have tried out the docker-compose.yml from https://www.spiffworkflow.org/posts/articles/get_started ? if so, there will already be a connector-proxy container running locally and you should be able to use a service task and configure it like this:
when you run the process, it would get task data like this (note that the response variable, respo
, gets populated with the response body of the http call:
I'm going to go ahead and close this issue, but feel free to re-open it or otherwise get in touch with any additional questions. 👍
from spiff-arena.
This looks exactly like what I should be using, thank you so much @jbirddog and @burnettk !
from spiff-arena.
@ManuelLevi awesome, did you end up using the service task / connector or the unrestricted python script environment?
from spiff-arena.
Related Issues (20)
- PI Migration: get forms into serialization HOT 3
- process instance events lose task info when tasks are deleted HOT 3
- Loop back path completed items colors HOT 1
- PI Migration - when current activity's name is updated HOT 3
- MI model related error
- Call activity from another call activity - Error HOT 2
- Inclusive Gate way - 'maximum recursion depth exceeded' error HOT 2
- PI Migration - New Activity skipped HOT 2
- PI Migration - Revert missing HOT 2
- Call Activity Instance diagram related error HOT 3
- 'View process instance at the time when this task was active' feature is not working HOT 4
- Errors during model implementation are displayed differently for different properties HOT 1
- PI Migration - migration not allowed HOT 11
- PI Migration - Odd behaviour with Guest task HOT 1
- Service Task Retry Logic HOT 1
- Displaying old graphs for non-upgraded instances
- Set Permissions / Multi-Instance Support HOT 1
- Adding new users to in-flight instances HOT 16
- Some other RBAC HOT 7
- PI Migration - Active Call activity/Sub process - Pre script/Post script update (Improvement) HOT 1
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 spiff-arena.