Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PDA Testing Tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
winfo
code-pro
PDA Testing Framework
PDA Testing Tool
Commits
c4c5293b
Commit
c4c5293b
authored
3 years ago
by
Henning
Browse files
Options
Downloads
Patches
Plain Diff
bugfix variable type to DSL
integer still not working, but fixxed it for String and Boolean
parent
3ebbbf87
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/bpmn/data/BPMNIOParameters.java
+46
-23
46 additions, 23 deletions
...asterthesis/Testgenerator/bpmn/data/BPMNIOParameters.java
with
46 additions
and
23 deletions
Testgenerator/src/main/java/de/fhmuenster/masterthesis/Testgenerator/bpmn/data/BPMNIOParameters.java
+
46
−
23
View file @
c4c5293b
...
...
@@ -7,6 +7,9 @@ import java.util.stream.Collectors;
import
java.util.stream.Stream
;
import
de.fhmuenster.masterthesis.serialization.TestgeneratorDSLObjectCreator
;
import
de.fhmuenster.masterthesis.testgeneratorDSL.BooleanVariable
;
import
de.fhmuenster.masterthesis.testgeneratorDSL.IntVariable
;
import
de.fhmuenster.masterthesis.testgeneratorDSL.StringVariable
;
import
de.fhmuenster.masterthesis.testgeneratorDSL.TestgeneratorDSLFactory
;
import
de.fhmuenster.masterthesis.testgeneratorDSL.VariableReference
;
...
...
@@ -80,43 +83,63 @@ public class BPMNIOParameters {
* @param taskId
*/
public
void
addSetVariable
(
String
flowElementId
,
String
setVarName
,
Object
setVarValue
)
{
// setVartiable == writeVariables/outputVariables
List
<
String
>
existingVariables
=
this
.
outputVariables
.
get
(
flowElementId
);
List
<
String
>
variables
=
existingVariables
!=
null
?
existingVariables
:
new
ArrayList
<>();
if
(!
variables
.
contains
(
setVarName
))
try
{
//
Need to
create
a new
Variable
//
Check Variable Type and
create Variable
if needed
if
(
setVarValue
instanceof
Integer
)
{
List
<
Integer
>
iList
=
new
ArrayList
<>();
iList
.
add
((
Integer
)
setVarValue
);
TestgeneratorDSLObjectCreator
.
createIntVariable
(
setVarName
,
iList
);
variables
.
add
(
setVarName
);
HashMap
<
String
,
Long
>
existingVariables
=
this
.
hardcodedInputParametersLong
.
get
(
flowElementId
);
HashMap
<
String
,
Long
>
variables
=
existingVariables
!=
null
?
existingVariables
:
new
HashMap
<>();
if
(!
variables
.
containsKey
(
setVarName
))
{
List
<
Integer
>
iValueList
=
new
ArrayList
<>();
iValueList
.
add
((
Integer
)
setVarValue
);
TestgeneratorDSLObjectCreator
.
createIntVariable
(
setVarName
,
iValueList
);
Long
lvar
=
(
Long
)
setVarValue
;
variables
.
put
(
flowElementId
,
lvar
);
}
this
.
hardcodedInputParametersLong
.
put
(
flowElementId
,
variables
);
}
else
if
(
setVarValue
instanceof
Boolean
)
{
List
<
Boolean
>
bList
=
new
ArrayList
<>();
bList
.
add
((
Boolean
)
setVarValue
);
TestgeneratorDSLObjectCreator
.
createBooleanVariable
(
setVarName
,
bList
);
variables
.
add
(
setVarName
);
HashMap
<
String
,
Boolean
>
existingVariables
=
this
.
hardcodedInputParametersBoolean
.
get
(
flowElementId
);
HashMap
<
String
,
Boolean
>
variables
=
existingVariables
!=
null
?
existingVariables
:
new
HashMap
<>();
if
(!
variables
.
containsKey
(
setVarName
))
{
List
<
Boolean
>
bValueList
=
new
ArrayList
<>();
bValueList
.
add
((
Boolean
)
setVarValue
);
TestgeneratorDSLObjectCreator
.
createBooleanVariable
(
setVarName
,
bValueList
);
variables
.
put
(
setVarName
,
(
Boolean
)
setVarValue
);
}
this
.
hardcodedInputParametersBoolean
.
put
(
flowElementId
,
variables
);
}
else
if
(
setVarValue
instanceof
String
)
{
List
<
String
>
sList
=
new
ArrayList
<>();
sList
.
add
((
String
)
setVarValue
);
TestgeneratorDSLObjectCreator
.
createStringVariable
(
setVarName
,
sList
);
variables
.
add
(
setVarName
);
List
<
String
>
existingVariables
=
this
.
outputVariables
.
get
(
flowElementId
);
List
<
String
>
variables
=
existingVariables
!=
null
?
existingVariables
:
new
ArrayList
<>();
if
(!
variables
.
contains
(
setVarName
))
{
List
<
String
>
sList
=
new
ArrayList
<>();
sList
.
add
((
String
)
setVarValue
);
TestgeneratorDSLObjectCreator
.
createStringVariable
(
setVarName
,
sList
);
variables
.
add
(
setVarName
);
}
this
.
outputVariables
.
put
(
flowElementId
,
variables
);
}
}
else
catch
(
Exception
e
)
{
// Variable already exists
variables
.
add
(
setVarName
);
System
.
out
.
println
(
"[DEBUG] "
+
e
.
getMessage
());
}
this
.
outputVariables
.
put
(
flowElementId
,
variables
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment