Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
workflow_core
Project
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
workflow_core
Commits
a4c87c52
Commit
a4c87c52
authored
Sep 27, 2018
by
jasl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
97d04074
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
tokens_controller.rb
.../app/controllers/workflows/instances/tokens_controller.rb
+5
-1
parallel_split.rb
test/dummy/app/models/transitions/parallel_split.rb
+0
-4
_parallel_split.html.erb
...workflow_core/transition_options/_parallel_split.html.erb
+0
-0
show.html.erb
.../dummy/app/views/workflows/instances/tokens/show.html.erb
+7
-0
No files found.
test/dummy/app/controllers/workflows/instances/tokens_controller.rb
View file @
a4c87c52
...
...
@@ -12,6 +12,7 @@ module Workflows
# POST /workflows/1/tokens/1/fire
def
show
@transition_valid
=
@token
.
place
.
output_transition
.
options
.
valid?
@form_record
=
@virtual_model
.
load
(
@instance
.
payload
)
end
...
...
@@ -20,7 +21,10 @@ module Workflows
@form_record
=
@virtual_model
.
load
(
@instance
.
payload
)
@form_record
.
assign_attributes
(
form_record_params
)
if
@form_record
.
valid?
@transition_valid
=
@token
.
place
.
output_transition
.
options
.
valid?
if
@form_record
.
valid?
&&
@transition_valid
@instance
.
update!
payload:
(
@instance
.
payload
||
{}).
merge
(
@form_record
.
serializable_hash
)
@token
.
place
.
output_transition
.
fire
(
@token
)
...
...
test/dummy/app/models/transitions/parallel_split.rb
View file @
a4c87c52
...
...
@@ -12,9 +12,5 @@ class Transitions::ParallelSplit < Transition
def
auto_forwardable?
true
end
def
options_configurable?
false
end
end
end
test/dummy/app/views/_workflow_core/transition_options/_parallel_split.html.erb
0 → 100644
View file @
a4c87c52
test/dummy/app/views/workflows/instances/tokens/show.html.erb
View file @
a4c87c52
<div
class=
"section"
>
<div
class=
"container"
>
<%
unless
@transition_valid
%>
<div
class=
"notification is-danger"
>
The transition are not configure properly,
please
<%=
link_to
"repair it"
,
edit_workflow_transition_options_path
(
@workflow
,
@token
.
place
.
output_transition
)
%>
.
</div>
<%
end
%>
<%=
render
"_form_core/render/form"
,
form:
@form
,
instance:
@form_record
,
options:
{
scope: :form_record
,
url:
workflow_instance_token_fire_path
(
@workflow
,
@instance
,
@token
),
local:
true
}
%>
...
...
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