Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cis-workflow-gen
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
msc
cis-workflow-gen
Commits
c38148f3
There was an error fetching the commit references. Please try again later.
Commit
c38148f3
authored
4 years ago
by
Bensong Liu
Browse files
Options
Downloads
Patches
Plain Diff
fix a bug: reducing bug on A OP (B OP C): Right side queue not merged in.
parent
7baa8030
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
activity.hpp
+15
-6
15 additions, 6 deletions
activity.hpp
workflows/E2EPOC-BuildPortal.cc
+1
-1
1 addition, 1 deletion
workflows/E2EPOC-BuildPortal.cc
workflows/another.cc
+25
-0
25 additions, 0 deletions
workflows/another.cc
with
41 additions
and
7 deletions
activity.hpp
+
15
−
6
View file @
c38148f3
...
...
@@ -111,7 +111,7 @@ namespace CIS {
xamlCode
=
activity
.
generateXaml
();
}
explicit
Flow
(
rlib
::
string
xamlCode
)
:
xamlCode
(
xamlCode
)
{}
Flow
(
const
Flow
&
another
)
:
queued
(
another
.
queued
),
xamlCode
(
another
.
xamlCode
),
prevOperationIsSequential
(
another
.
prevOperationIsSequential
)
{}
Flow
(
const
Flow
&
another
)
:
queued
OnRight
(
another
.
queued
OnRight
),
xamlCode
(
another
.
xamlCode
),
prevOperationIsSequential
(
another
.
prevOperationIsSequential
)
{}
// Actually modify xamlCode on "OperationChange".
// for example, A >> B >> C >> D | E. ABCD should be merged into one sequential operation.
...
...
@@ -129,7 +129,9 @@ namespace CIS {
private
:
bool
prevOperationIsSequential
=
true
;
rlib
::
string
xamlCode
;
std
::
queue
<
rlib
::
string
>
queued
;
// For a long expression A >> B >> C >> D, A is in xamlCode, and [B,C,D] are cached in queuedOnRight to wait for merge.
std
::
list
<
rlib
::
string
>
queuedOnRight
;
Flow
binaryOperation
(
Flow
seqNext
,
bool
thisOperationIsSequential
)
const
{
Flow
result
=
*
this
;
...
...
@@ -137,18 +139,25 @@ namespace CIS {
seqNext
.
reduceQueuedIfNecessary
(
thisOperationIsSequential
);
result
.
prevOperationIsSequential
=
thisOperationIsSequential
;
result
.
queued
.
push
(
seqNext
.
xamlCode
);
result
.
queuedOnRight
.
emplace_back
(
seqNext
.
xamlCode
);
for
(
auto
&&
item
:
seqNext
.
queuedOnRight
)
result
.
queuedOnRight
.
emplace_back
(
item
);
return
result
;
}
void
reduceQueuedIfNecessary
(
bool
thisOperationIsSequential
)
{
if
(
thisOperationIsSequential
==
prevOperationIsSequential
||
queued
.
empty
())
return
;
if
(
thisOperationIsSequential
==
prevOperationIsSequential
||
queued
OnRight
.
empty
())
return
;
rlib
::
string
resultXaml
=
prevOperationIsSequential
?
templates
::
SEQ_BEGIN
:
templates
::
PAR_BEGIN
;
resultXaml
+=
xamlCode
;
while
(
!
queued
.
empty
())
resultXaml
+=
queued
.
front
(),
queued
.
pop
();
for
(
auto
&&
item
:
queuedOnRight
)
resultXaml
+=
item
;
resultXaml
+=
prevOperationIsSequential
?
templates
::
SEQ_END
:
templates
::
PAR_END
;
xamlCode
=
std
::
move
(
resultXaml
);
queuedOnRight
.
clear
();
}
};
...
...
This diff is collapsed.
Click to expand it.
workflows/E2EPOC-BuildPortal.cc
+
1
−
1
View file @
c38148f3
...
...
@@ -12,5 +12,5 @@ int main() {
DEFINE_ACTIVITY
(
CustomerLockboxUX
);
auto
flow
=
AdminCenterApp
|
OfficeHome
|
ShellServices
|
PortalUseageReports
|
SvcHealthDashboard
|
CustomerLockboxUX
;
println
(
to_file
(
"BuildPortal.xaml"
),
flow
.
generateXaml
(
"FleetAGC.Workflows.BuildPortal"
));
println
(
to_file
(
"
E2EPOC
BuildPortal
Workflow
.xaml"
),
flow
.
generateXaml
(
"FleetAGC.Workflows.BuildPortal"
));
}
This diff is collapsed.
Click to expand it.
workflows/another.cc
0 → 100644
+
25
−
0
View file @
c38148f3
#include
<cis-workflow-gen/quick-include.hpp>
int
main
()
{
#define DEFINE_ACTIVITY(name, entityName) \
Activity name (#name, "FleetAGC.Activities.DelayActivity", entityName); \
name.addInputSetting("Timespan", "60");
DEFINE_ACTIVITY
(
GridManager
,
"M365Poc.SPO.GridManager"
)
DEFINE_ACTIVITY
(
AuthAndProvision
,
"M365Poc.SPO.AuthProvisioning"
)
DEFINE_ACTIVITY
(
FarmsAndTennats
,
""
)
DEFINE_ACTIVITY
(
CSC
,
""
)
DEFINE_ACTIVITY
(
FastSearch
,
""
)
DEFINE_ACTIVITY
(
Microservices
,
"M365Poc.SPO.MicroServices"
)
DEFINE_ACTIVITY
(
MonitorAndAlert
,
"M365Poc.SPO.MonitoringAlerting"
)
DEFINE_ACTIVITY
(
SPOTooling
,
"M365Poc.SPO.SPOTooling"
)
DEFINE_ACTIVITY
(
UXCDNFailover
,
"M365Poc.SPO.UXCDNFailover"
)
DEFINE_ACTIVITY
(
ODFBSyncClient
,
"M365Poc.SPO.ODFBSyncClient"
)
auto
block1
=
GridManager
>>
FarmsAndTennats
>>
(
CSC
|
FastSearch
);
auto
block2
=
Microservices
|
MonitorAndAlert
;
auto
completeFlow
=
block1
|
AuthAndProvision
|
block2
;
// | SPOTooling | UXCDNFailover | ODFBSyncClient;
println
(
to_file
(
"SPOBuildoutPOCWorkflow.xaml"
),
completeFlow
.
generateXaml
(
"FleetAGC.Workflows.SPOBuildoutPOCWorkflow"
));
}
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