main
alex 2024-03-03 22:15:23 +01:00
parent 94e314fcec
commit ffbbd9e953
2 changed files with 33 additions and 3 deletions

View File

@ -0,0 +1,19 @@
import time
import sys
import json
time.sleep(3)
# arg format is like this: args ['test1.py', '{"kiste":{"value":"321"},"labelformat":{"value":"123123"},"print_machine_selection":{"data":{"displayName":"Brother Workplace","ip":"127.0.0.1"},"value":"Brother Workplace"}}', '--undo'] undo is optional
json_object = json.loads(sys.argv[1])
customer_salutation = json_object["customer_salutation"]
customer_name = json_object["customer_name"]
customer_email = json_object["customer_email"]
appointment_location = json_object["appointment_location"]
zeitadler_json_data = json_object["zeitadler_json_data"]
print("args", sys.argv)
print("customer_salutation", customer_salutation)
print("customer_name", customer_name)

View File

@ -5,11 +5,17 @@
"tasks": [
{
"name": "Kundendaten für Bestätigungsemail",
"onFinish": "pause",
"onFinish": "next",
"undoPossible": false,
"repeatPossible": true,
"scriptPath": "test1.py",
"scriptPath": "data.py",
"parameters": [
{
"parameterName": "customer_salutation",
"type": "select",
"displayName": "Anrede",
"options": ["Herr", "Frau"]
},
{
"parameterName": "customer_name",
"type": "text",
@ -23,10 +29,15 @@
"global": false
},
{
"parameterName": "select_location",
"parameterName": "appointment_location",
"type": "select",
"displayName": "Standort",
"options": ["Online Meeting", "Vor Ort"]
},
{
"parameterName": "zeitadler_json_data",
"type": "text",
"displayName": "ZeitAdler Termin JSON DATA"
}
]
}