Sample of Zip activity from Zip activity pack
Does anyone have a working sample of the use of the Zip activity from the Zip activity pack?
https://github.com/vertigis/workflow-activities-zip/blob/main/README.md
What input should be used for the Files input?
-
For anyone interested, here's a basic sample workflow.
{"_properties":{},"components":[{"id":1,"steps":[{"id":2,"inputs":{},"position":"0,0","purpose":"start","title":"Start","transitions":[{"id":9,"position":"90,60 90,110","target":{"id":7}}]},{"action":"uuid:3ece02ad-9d43-49aa-a82f-69aaa128bb54::Zip","id":5,"inputs":{"files":{"accessors":["$value1"],"annotations":[{"count":7,"index":0,"kind":"idref"}],"code":"$value1.result","source":"$value1.result"}},"name":"zip1","position":"-30,550","title":"Zip","transitions":[{"id":19,"position":"90,610 90,660","target":{"id":15}}]},{"action":"gcx:wf:forms:form:DisplayForm","id":7,"inputs":{"form":{"accessors":[],"code":"resources.forms[values.id]","values":{"id":8}}},"name":"form1","position":"-30,110","title":"Display Form","transitions":[{"id":21,"position":"90,230 90,280","target":{"id":20}}]},{"action":"uuid:9f74ca74-c74e-4951-9a57-03c3781c73e4::DownloadFile","id":15,"inputs":{"file":{"accessors":["$zip1"],"annotations":[{"count":5,"index":0,"kind":"idref"}],"code":"$zip1.result","source":"$zip1.result"},"fileName":"test.zip"},"position":"-30,660","title":"Download File"},{"action":"gcx:wf:core::CreateValue","id":20,"inputs":{"expression":{"accessors":[],"annotations":[],"code":"{}","source":"{}"}},"name":"value1","position":"-30,280","title":"Create Value","transitions":[{"id":27,"position":"90,340 90,380","target":{"id":23}}]},{"action":"gcx:wf:core:loop:ForEach","id":23,"inputs":{"items":{"accessors":["$form1"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$form1.state.filePicker1.value.files","source":"$form1.state.filePicker1.value.files"}},"name":"forEach1","position":"-30,380","title":"For Each","transitions":[{"id":28,"position":"90,500 90,550","target":{"id":5}}]}]},{"id":24,"steps":[{"id":25,"inputs":{},"position":"0,0","purpose":"start","title":"For Each","transitions":[{"id":30,"position":"90,60 90,110","target":{"id":29}}]},{"action":"gcx:wf:core::SetProperty","id":29,"inputs":{"object":{"accessors":["$value1"],"annotations":[{"count":7,"index":0,"kind":"idref"}],"code":"$value1.result","source":"$value1.result"},"propertyName":{"accessors":["$forEach1"],"annotations":[{"count":9,"index":0,"kind":"idref"}],"code":"$forEach1.item.name","source":"$forEach1.item.name"},"propertyValue":{"accessors":["$forEach1"],"annotations":[{"count":9,"index":0,"kind":"idref"}],"code":"$forEach1.item","source":"$forEach1.item"}},"position":"-30,110","title":"Set Property"}]}],"deploymentConfig":{"supportedApps":{"VSW":true}},"designerVersion":"5.40.1+4","forms":[{"defaults":{},"elements":{"filePicker1":{"enabled":true,"index":0,"prompt":{"markdown":"Add File"},"rowIndex":0,"rowNumber":0,"title":{"markdown":"File Picker"},"type":"FilePicker"},"footer":{"enabled":true,"items":{"0":{"default":true,"index":0,"label":{"markdown":"Submit"},"validates":true,"value":"submit"},"1":{"index":1,"label":{"markdown":"Cancel"},"validates":false,"value":"cancel"}},"section":"footer","type":"ButtonBar"},"header":{"section":"header","title":{"markdown":"Form Title"},"type":"Header"}},"id":8}],"references":[{"id":33,"path":"https://unpkg.com/@vertigis/workflow-activities-zip@2.0.0","suite":"uuid:3ece02ad-9d43-49aa-a82f-69aaa128bb54"},{"id":34,"path":"https://unpkg.com/@vertigis/workflow-activities-web-apis@3.0.0","suite":"uuid:9f74ca74-c74e-4951-9a57-03c3781c73e4"}],"start":{"id":2},"transitions":[{"branch":"loop","id":26,"source":{"id":23},"target":{"id":25}}]}0
Please sign in to leave a comment.
Comments
1 comment