Task
Task Feature in Workflow – Automating Multi-Entity Actions
In RUN Platform, the Task feature inside the Workflow module is designed to give you more control and flexibility by allowing you to perform additional actions before or after a CRUD operation. This is especially useful when you need to manipulate or connect multiple entities during a single workflow process.
Real Example: Member Registration in a Basketball Club
Let ’s say you're building an application for a basketball club. When a new member registers, the application needs to store their data in an entity called Anggota (members). At the same time, because every registration includes a registration fee, this fee must also be recorded in a separate entity called Pemasukan (income).
Workflow + Task: How It Works
In the workflow named create_anggota, which handles the creation of new records in the Anggota entity, you can add a Task to handle related operations.
In this case, a Task called biaya_registrasi is added as part of the same workflow. This task will automatically insert data into the Pemasukan entity, using the value from the registration fee (biaya_registrasi) field that was entered in the Anggota form.
What Happens During Execution:
- A user submits the "Register New Member" form.
- The Create_anggota workflow runs and stores the member’s data in the Anggota entity.
- Immediately after, the Biaya_Registrasi task is triggered as part of the same workflow.
- This task takes the registration fee from the form and creates a new record in the Pemasukan entity, including details like:
- Amount (nominal)
- Description (e.g., Registration Fee)
- Date of transaction
Benefits:
- Ensures that every member registration is properly logged along with its corresponding financial record.
- Eliminates manual double-entry of data across entities.
- Helps maintain accurate and up-to-date financial records.
- Offers a scalable and automated way to handle complex business processes across multiple entities.
By using Tasks within workflows, RUN Platform empowers users to build smarter and more connected applications — turning simple forms into full-fledged operational flows.