GUIFlow is a no-code workflow builder.
Check the documentation for more details
- PHP >= 8
- justinrainbow/json-schema
- wyndow/fuzzywuzzy
- From v2.*, we have additional requirements:
composer require phelixjuma/guiflow
$data = [
'customer_name' => 'Naivas',
'delivery_location' => 'Kilimani',
'items' => [
['name' => 'Capon Chicken', 'quantity' => 2,'uom' => 'KGS', 'unit_price' => 100]
],
"delivery_date" => "2023-09-04"
];
$config = json_decode('[{
"rule": "Split orders for different brands",
"skip": "0",
"description": "",
"stage": "split_orders",
"dependencies": [],
"condition": {
"path": "items.*.matched_value.PrincipalCode",
"operator": "exists"
},
"actions": [
{
"stage": "split_items",
"description": "",
"dependencies": [],
"skip":"0",
"action": "function",
"path": "",
"function": "split",
"args": {
"split_path": "items",
"criteria_path": "items.*.matched_value.PrincipalCode"
}
}
]
}]');
class userDefinedFunctionsClass {
// class that defines all user defined functions outside the package ecosystem.
}
$udfObj = new userDefinedFunctionsClass();
$workflow = new Workflow($config, $udfObj);
$workflow->run($data, true); // set second parameter to true for parallel execution
print_r($data); // this will show the modified data