Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/rm1562' into github
Browse files Browse the repository at this point in the history
  • Loading branch information
dofs197 committed Aug 30, 2020
2 parents f6a6c56 + 96abf01 commit 28ce70a
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions workspace/Demo - Bots/officeDocx/bots.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
<config>
<input>
<param name="ParamTemplate" value="FileTemplate"/>
<param name="ParamNumbers" variable="numbers"/>
<param name="ParamDateTimeNow" variable="dtnow"/>
<param name="ParamTableName" variable="TableName"/>
<param name="ParamItems" variable="items"/>
<param name="ParamPrices" variable="prices"/>
<param name="ParamNumbers" variable="numbers"/>
<param name="ParamDateTimeNow" variable="dtnow"/>
<param name="ParamPrices" variable="prices"/>
</input>
<output>
<param name="ParamReport" variable="FileReport"/>
<param name="ParamReport" value="FileReport"/>
<param name="Полученный документ Word" variable="FileReport"/>
</output>
</config>
</task>
Expand Down
8 changes: 6 additions & 2 deletions workspace/Demo - Bots/officeDocx/processdefinition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<process name="officeDocx">
<extensionElements>
<runa:property name="showSwimlane" value="none"/>
<runa:property name="documentation" value="Bot creates docx file"/>
<runa:property name="version" value="4.2.0.M20150318-1835"/>
<runa:property name="accessType" value="Process"/>
<runa:property name="version" value="4.4.0.M20200807-0618"/>
<runa:property name="documentation" value="Bot creates docx file"/>
</extensionElements>
<laneSet id="laneSet1">
<lane id="ID5" name="operator">
Expand All @@ -33,13 +33,17 @@
<documentation><![CDATA[Create report]]></documentation>
<extensionElements>
<runa:property name="lane" value="bot"/>
<runa:property name="reassign" value="false"/>
<runa:property name="reassignSwimlaneToTaskPerformer" value="true"/>
</extensionElements>
</userTask>
<sequenceFlow id="ID23" name="tr1" sourceRef="ID2" targetRef="ID6"/>
<userTask id="ID6" name="Download docx">
<documentation><![CDATA[Download DOCX]]></documentation>
<extensionElements>
<runa:property name="lane" value="operator"/>
<runa:property name="reassign" value="false"/>
<runa:property name="reassignSwimlaneToTaskPerformer" value="true"/>
</extensionElements>
</userTask>
<sequenceFlow id="ID24" name="tr1" sourceRef="ID6" targetRef="ID10"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<parameters>
<config>
<input>
<param name="ParamTableName" label="ParamTableName" formatFilter="java.lang.String"/>
<param name="ParamItems" label="ParamItems" formatFilter="java.util.List"/>
<param name="ParamPrices" label="ParamPrices" formatFilter="java.util.List"/>
<param name="ParamNumbers" label="ParamNumbers" formatFilter="java.util.List"/>
<param name="ParamDateTimeNow" label="ParamDateTimeNow" formatFilter="java.util.Date"/>
<param name="ParamNumbers" label="ParamNumbers" formatFilter="java.lang.Object"/>
<param name="ParamDateTimeNow" label="ParamDateTimeNow" formatFilter="java.lang.Object"/>
<param name="ParamTableName" label="ParamTableName" formatFilter="java.lang.Object"/>
<param name="ParamItems" label="ParamItems" formatFilter="java.lang.Object"/>
<param name="ParamPrices" label="ParamPrices" formatFilter="java.lang.Object"/>
</input>
<output>
<param name="ParamReport" label="ParamReport" formatFilter="ru.runa.wfe.var.file.FileVariable"/>
<param name="Полученный документ Word" label="Полученный документ Word" formatFilter="ru.runa.wfe.var.file.FileVariable"/>
</output>
</config>
</parameters>
<botconfig>
<config strict="true">
<input path="bot/docx-template.docx"/>
<output variable="ParamReport" fileName="Report.docx"/>
<config strict="false">
<input path="botfile://Generate_DOCX.embedded.docx"/>
<output variable="Полученный документ Word" fileName="Полученный документ Word.docx"/>
</config>
</botconfig>
</extended>
Binary file not shown.

0 comments on commit 28ce70a

Please sign in to comment.