Skip to content

Commit

Permalink
comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Volak committed Aug 2, 2024
1 parent 102b9f4 commit f4a8eaa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions frinx-workflow-manager/python-sdk/development/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ This guide provides the step-by-step instructions for preparing develoment envir

Install Frinx Machine with ingress enabled [!ref icon="briefcase"](/frinx-machine/installation/customization/frinx-machine-customization/readme.md)


Check out gitops-boilerplate repository to run Frinx Machine locally [!ref target="blank" icon="mark-github" text="frinx-workers-boilerplate"](https://github.com/FRINXio/gitops-boilerplate)

Make sure you have enabled workflow-manager and krakend ingress, because it's required for local development.

```bash
Expand Down
11 changes: 9 additions & 2 deletions frinx-workflow-manager/python-sdk/frinx-python-sdk/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ build-backend = "poetry.core.masonry.api"

In worker.py we want to create some piece of logic, which will be used in workflows to solve complex problems.
Our worker has predefined interface, where you can define conductor task definitions, inputs and outpus.
In method execute, you can make any your custom logic. For example call to our service, parse data from previous task or any other code you want.
In method execute, you can implement your custom logic. For example call to our service, parse data from previous task or any other code you want.


```python
Expand Down Expand Up @@ -87,6 +87,7 @@ class TestWorkers(ServiceWorkersImpl):
logs=['Echo worker invoked successfully'],
output=self.WorkerOutput(output=worker_input.input)
)

```

### Workflow definition
Expand Down Expand Up @@ -130,6 +131,8 @@ class TestWorkflows(ServiceWorkflowsImpl):
)

# WorkflowImpl.WorkflowOutput: Define workflow outputs
# Parameters in workflowOutput are still strings, because they keep only
# reference to task output
class WorkflowOutput(WorkflowImpl.WorkflowOutput):
text: str

Expand All @@ -150,11 +153,15 @@ class TestWorkflows(ServiceWorkflowsImpl):
)
self.tasks.append(echo_task)

self.output_parameters = self.WorkflowOutput(
text=echo_task.output_ref('output')
)

```

### Start worker

Now make conductor client, which register our workflow and will be executing custom worker logic.
Now implement conductor client, which registers our workflow and executes custom worker logic.

```python
# main.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class CreateTransaction(WorkerImpl):
```
In this example, we used frinx-python-sdk and frinx-services-python-api to create conductor worker compatible with Frinx Machine 6.1.0 release.
For more detail, how to inport and execute this worke, please visit SDK part.
For more details, how to import and execute this worker, please visit SDK part.
### Versioning
Expand Down
2 changes: 2 additions & 0 deletions frinx-workflow-manager/python-sdk/workflow-builder/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ expression = "function e() { if ($.value){return {\"result\": true}} else { retu

### JOIN TASK

Read more on [conductor-oss docs](https://docs.conductor-oss.org/documentation/configuration/workflowdef/operators/join-task.html)

+++ Default
```python
self.tasks.append(JoinTask(
Expand Down

0 comments on commit f4a8eaa

Please sign in to comment.