You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
eater 1c804ab7eb
Initial commit
5 years ago
cmd Initial commit 5 years ago
examples Initial commit 5 years ago
workflow Initial commit 5 years ago
LICENSE Initial commit 5 years ago
README.md Initial commit 5 years ago
main.go Initial commit 5 years ago

README.md

Servitor

A workflow engine.

Current sample workflow definition:

workflow:
  timeout: 60s
  services:
    users:
      wsdl: https://example.com/xml-rpc
      service: UserController

  entry:
  - name: load data
    collect: # collect data in parallel
    - name: load target user
      do: 'users.load_user(target_user_id, {relevant_users: user_id})'
      register: target_user
    - name: load user
      do: 'users.load_user(target_id, {relevant_users: target_user_id})'
      register: user
  - if: user.id in target_user.blocked or target_user.id in user.blocked
    then: <END> # If blocked, we can't be friends and ignore
  - if: user.id in target_user.open_friend_requests
    then: flow:add friend # If there's an open request from the target, add them immeditially
    else: flow:send request

  flows:
    send request:
    - name: add request
      do: target_user.send_friend_request(user.id)
    - name: send email notification
      if: target_user.has_email_notifications
      do: target_user.emails.friend_request(user.id)
    add friend:
    - name: consume friend request
      do: user.consume_friend_request(target_user.id)