Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bp_custom
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikhail Gashenko
bp_custom
Commits
fc316010
Commit
fc316010
authored
Jan 25, 2017
by
everdarkgreen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
assignment bug: resolved
parent
f20f72d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
11 deletions
+29
-11
Main.java
src/main/java/kz/arta/synergy/astdev/custom_bp/Main.java
+29
-11
No files found.
src/main/java/kz/arta/synergy/astdev/custom_bp/Main.java
View file @
fc316010
...
@@ -31,6 +31,10 @@ import javax.ejb.MessageDriven;
...
@@ -31,6 +31,10 @@ import javax.ejb.MessageDriven;
@ActivationConfigProperty
(
propertyName
=
"acknowledgeMode"
,
propertyValue
=
"Auto-acknowledge"
)})
@ActivationConfigProperty
(
propertyName
=
"acknowledgeMode"
,
propertyValue
=
"Auto-acknowledge"
)})
public
class
Main
implements
MessageListener
{
public
class
Main
implements
MessageListener
{
private
enum
fieldType
{
DATE
,
TEXTBOX
}
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
Main
.
class
);
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
Main
.
class
);
...
@@ -87,15 +91,16 @@ public class Main implements MessageListener {
...
@@ -87,15 +91,16 @@ public class Main implements MessageListener {
String
t26b1
,
t24b1
,
t22b1
;
String
t26b1
,
t24b1
,
t22b1
;
String
t32b1
,
t30b1
,
t28b1
;
String
t32b1
,
t30b1
,
t28b1
;
b2b1
=
getDateKeyByFieldName
(
sourceFormData
,
"b2-b1"
);
b2b1
=
getDateKeyByFieldName
(
sourceFormData
,
"b2-b1"
,
fieldType
.
DATE
);
b4b1
=
getDateKeyByFieldName
(
sourceFormData
,
"b4-b1"
);
b4b1
=
getDateKeyByFieldName
(
sourceFormData
,
"b4-b1"
,
fieldType
.
DATE
);
b5b1
=
getDateKeyByFieldName
(
sourceFormData
,
"b5-b1"
,
fieldType
.
TEXTBOX
);
LOGGER
.
info
(
getDateKeyByFieldName
(
sourceFormData
,
"b2-b1"
)
);
LOGGER
.
info
(
b2b1
+
" "
+
b4b1
+
" "
+
b5b1
);
// Получение данных целевой карточки
// Получение данных целевой карточки
// Разблокировка маршрута
// Разблокировка маршрута
""
String
address
=
"http://127.0.0.1:8080/Synergy"
;
String
address
=
"http://127.0.0.1:8080/Synergy"
;
String
signal
=
"got_agree"
;
String
signal
=
"got_agree"
;
URL
url
=
new
URL
(
address
+
"/rest/api/processes/signal?signal="
+
signal
+
"&executionID="
+
executionID
+
"¶m1=resolution&value1=signal_is_"
+
signal
);
URL
url
=
new
URL
(
address
+
"/rest/api/processes/signal?signal="
+
signal
+
"&executionID="
+
executionID
+
"¶m1=resolution&value1=signal_is_"
+
signal
);
...
@@ -106,18 +111,31 @@ public class Main implements MessageListener {
...
@@ -106,18 +111,31 @@ public class Main implements MessageListener {
}
}
}
}
private
String
getDateKeyByFieldName
(
final
JsonParser
formJson
,
final
String
fieldName
)
{
/**
* */
private
static
String
getDateKeyByFieldName
(
final
JsonParser
formJson
,
final
String
fieldName
,
fieldType
fieldT
)
{
String
value
=
new
String
();
String
value
=
new
String
();
try
{
try
{
while
(!
formJson
.
isClosed
())
{
while
(!
formJson
.
isClosed
())
{
if
(
JsonToken
.
FIELD_NAME
.
equals
(
formJson
.
nextToken
()))
{
if
(
JsonToken
.
FIELD_NAME
.
equals
(
formJson
.
nextToken
()))
{
if
(
"id"
.
equals
(
formJson
.
getCurrentName
())
&&
fieldName
.
equals
(
formJson
.
nextTextValue
()))
{
if
(
"id"
.
equals
(
formJson
.
getCurrentName
())
&&
fieldName
.
equals
(
formJson
.
nextTextValue
()))
{
formJson
.
nextToken
();
switch
(
fieldT
)
{
formJson
.
nextToken
();
case
DATE:
formJson
.
nextToken
();
formJson
.
nextToken
();
LOGGER
.
info
(
fieldName
+
": "
+
formJson
.
nextTextValue
());
formJson
.
nextToken
();
value
=
formJson
.
nextTextValue
();
formJson
.
nextToken
();
break
;
formJson
.
nextToken
();
formJson
.
nextToken
();
value
=
formJson
.
nextTextValue
();
break
;
case
TEXTBOX:
formJson
.
nextToken
();
formJson
.
nextToken
();
formJson
.
nextToken
();
formJson
.
nextToken
();
value
=
formJson
.
nextTextValue
();
break
;
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment