From 9298852ca11ea77271037d31527f416aee3b8428 Mon Sep 17 00:00:00 2001 From: sw Date: Mon, 10 Aug 2020 17:11:53 +0300 Subject: [PATCH 1/3] officeDocx Create DOCX --- workspace/Demo - Bots/officeDocx/bots.xml | 9 +++++---- .../officeDocx/processdefinition.xml | 8 ++++++-- .../UniversalBot/Generate DOCX.conf | 18 +++++++++--------- .../UniversalBot/Generate_DOCX.embedded.docx | Bin 0 -> 9891 bytes 4 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 workspace/localbotstation/src/botstation/UniversalBot/Generate_DOCX.embedded.docx diff --git a/workspace/Demo - Bots/officeDocx/bots.xml b/workspace/Demo - Bots/officeDocx/bots.xml index a02b19ad9..cb341456f 100644 --- a/workspace/Demo - Bots/officeDocx/bots.xml +++ b/workspace/Demo - Bots/officeDocx/bots.xml @@ -5,14 +5,15 @@ + + - - - + - + + diff --git a/workspace/Demo - Bots/officeDocx/processdefinition.xml b/workspace/Demo - Bots/officeDocx/processdefinition.xml index 938e24a86..b531b1799 100644 --- a/workspace/Demo - Bots/officeDocx/processdefinition.xml +++ b/workspace/Demo - Bots/officeDocx/processdefinition.xml @@ -4,9 +4,9 @@ - - + + @@ -33,6 +33,8 @@ + + @@ -40,6 +42,8 @@ + + diff --git a/workspace/localbotstation/src/botstation/UniversalBot/Generate DOCX.conf b/workspace/localbotstation/src/botstation/UniversalBot/Generate DOCX.conf index 7931a69b3..5209550c4 100644 --- a/workspace/localbotstation/src/botstation/UniversalBot/Generate DOCX.conf +++ b/workspace/localbotstation/src/botstation/UniversalBot/Generate DOCX.conf @@ -4,21 +4,21 @@ - - - - - + + + + + - + - - - + + + diff --git a/workspace/localbotstation/src/botstation/UniversalBot/Generate_DOCX.embedded.docx b/workspace/localbotstation/src/botstation/UniversalBot/Generate_DOCX.embedded.docx new file mode 100644 index 0000000000000000000000000000000000000000..1b13f5f298c94606c3226578673a9d9ca829e994 GIT binary patch literal 9891 zcmaia1ymi&vNjSVxLXKLaEFaM!QI_m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m@2*;&jdcl{6S9Z^W@yp@tst)8SkSD!G#Fz&bMj zr2eAegKfPp+t98EZ=o22@DTq2ch!6z4##wj3i}QfF;DTkb8F8LeuYh=YEO(ef516n+|}XEUl6q^ekQzZUEa=--p4Hktebr&v<qclkc4PesSSzH^mm~yCU0=lKQMh^X7@+ z`SP~m!h5tM`&q;DZmT%wneDkuoy_C;_9pxJ4E37UJ6!Ho^J=@f#Ut$FW;0N2l$So~ z=KAcA(VjED+{0r$$2>f>gq9qS7T6T~eSQo|`7!rF8Pqx)o7X1Cx!-L&DtPHeMyn9_7tylMBTY{8KH$5ER={>qqWwBI0DB-j<6iL*VZnpfG zMh&5Kp=#E8@8~H{Xu{9daE(G?`W+_yW@Y<@7BwtFwJS6Fnh8YUMQzpAa^btTf?iaG z@p3Gykl!K<-p}fbp`CmdY73CoTL)+3G4nV=I|tAj%HB!Q@M$M+M^3LGvkg)(^n7;H z*Q$m5ni_Ul%uyWZ5jvhnJxTfXUQ57kRv>U(y&~i=-om7P{zn^y(KSP3Eoc=R-@vI< z-=W$iXn{82ZKY_g3AX2yDtv^RV}|?@y{qmAp|79vmPFWeJWT;c*%pSEy=`4VOz{OL*lD-y%-{}%D5Q~vMlfBHyY-Oay=_{DYbYXpCBKL4HnPcOt@yAOE* z_W$#%{+<2LFZ|V2@tcfa@c704+i~%C=0B(AUuTini%;Z#SrTL=AYNbv0fBw_eS4WF JBgC(@{|7)Eq_qG5 literal 0 HcmV?d00001 From 83b3699856e1b569fdd4a17a128c8d3135aae7ab Mon Sep 17 00:00:00 2001 From: Andrey Nikiforov Date: Wed, 26 Aug 2020 07:35:36 +0500 Subject: [PATCH 2/3] move reload docx button is bots --- .../runa/gpd/extension/handler/XmlBasedConstructorProvider.java | 2 +- .../src/ru/runa/gpd/ui/custom/ProcessFileComposite.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ru.runa.gpd/src/ru/runa/gpd/extension/handler/XmlBasedConstructorProvider.java b/plugins/ru.runa.gpd/src/ru/runa/gpd/extension/handler/XmlBasedConstructorProvider.java index 8207d0e41..64f560295 100644 --- a/plugins/ru.runa.gpd/src/ru/runa/gpd/extension/handler/XmlBasedConstructorProvider.java +++ b/plugins/ru.runa.gpd/src/ru/runa/gpd/extension/handler/XmlBasedConstructorProvider.java @@ -183,7 +183,7 @@ protected Control createDialogArea(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout()); GridData gridData = new GridData(); - gridData.widthHint = 700; + gridData.widthHint = dialogEnhancementMode.is(DocxDialogEnhancementMode.DOCX_SHOW_INPUT) ? 500 : 700; composite.setLayoutData(gridData); ScrolledComposite scrolledComposite = new ScrolledComposite(composite, SWT.V_SCROLL); diff --git a/plugins/ru.runa.gpd/src/ru/runa/gpd/ui/custom/ProcessFileComposite.java b/plugins/ru.runa.gpd/src/ru/runa/gpd/ui/custom/ProcessFileComposite.java index 8e99e03c7..99f5bb057 100644 --- a/plugins/ru.runa.gpd/src/ru/runa/gpd/ui/custom/ProcessFileComposite.java +++ b/plugins/ru.runa.gpd/src/ru/runa/gpd/ui/custom/ProcessFileComposite.java @@ -36,7 +36,7 @@ public ProcessFileComposite(Composite parent, IFile file, DialogEnhancementMode if (null != dialogEnhancementMode && (dialogEnhancementMode.checkBotDocxTemplateEnhancementMode() || dialogEnhancementMode.checkScriptDocxTemplateEnhancementMode())) { GridData gridData = new GridData(); - gridData.widthHint = 333; + gridData.widthHint = 280; setLayoutData(gridData); } rebuild(); From 96abf017c596848f852c40e1eabdde9916f15aa4 Mon Sep 17 00:00:00 2001 From: Andrey Nikiforov Date: Thu, 27 Aug 2020 17:50:10 +0500 Subject: [PATCH 3/3] maps and lists of standards types --- .../gpd/ui/enhancement/DocxDialogEnhancement.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/ru.runa.gpd/src/ru/runa/gpd/ui/enhancement/DocxDialogEnhancement.java b/plugins/ru.runa.gpd/src/ru/runa/gpd/ui/enhancement/DocxDialogEnhancement.java index 3979c28e5..0e03f44cb 100644 --- a/plugins/ru.runa.gpd/src/ru/runa/gpd/ui/enhancement/DocxDialogEnhancement.java +++ b/plugins/ru.runa.gpd/src/ru/runa/gpd/ui/enhancement/DocxDialogEnhancement.java @@ -207,14 +207,21 @@ public static Boolean checkScriptTaskParametersWithDocxTemplate(Delegable delega || baseVar.getFormat().compareTo("ru.runa.wfe.var.format.ActorFormat") == 0) ? actorFieldsMap : (baseVar.getFormat().compareTo("ru.runa.wfe.var.format.GroupFormat") == 0 ? groupFieldsMap : null); - // for Lists and UserTypes + // for Lists/Maps and UserTypes, List/Maps of standard types if (null == fieldsMap) { VariableUserType userType = baseVar.getUserType(); - if (null == userType && baseVar.getFormat().startsWith("ru.runa.wfe.var.format.ListFormat")) { + if (null == userType && (baseVar.getFormat().startsWith("ru.runa.wfe.var.format.ListFormat") + || baseVar.getFormat().startsWith("ru.runa.wfe.var.format.MapFormat"))) { embeddedTypeName = ru.runa.gpd.util.VariableUtils.getListVariableComponentFormat(baseVar); userType = processDefinition.getVariableUserType(embeddedTypeName); + + if (null == userType) { // try standard type in list + if (!attrName.contains(".")) { + check = false; + } + } } - if (null != userType) { + if (null != userType && check) { String[] attrs = attrName.split("[.]"); for (int index = 0; index < attrs.length; index++) { boolean finded = false;