Confusion configuring silverstripe advancedworkflow workflow - module

I'm assessing the advancedworkflow module (version 3.0.2) for the first time, in a fresh Silverstripe 3.1.5 installation.
Initially, I tried setting up a custom workflow but struggled to get it working, so I decided to start with the single-action 'Publish' workflow, and then incrementally enhance and test the workflow until it matched the intended target, but have quickly hit a point of confusion.
The basic configuration (new account - can't post an image!), which doesn't even reassign to another user group action, is as follows:
SimpleApprovalWorkflowAction: 'Approve Publication'
--> Transition: 'approve' -> Publish
--> Transition: 'reject' -> Reject Publication
PublishItemWorkflowAction: 'Publish'
CancelWorkflowAction: 'Reject Publication'
so the sequence for the initiator should (?) just be:
(make change / save draft)
Approve Publication
Publish
However, when, after making the initial change and clicking 'Approve Publication', the page remains in a draft state but there is no second step to actually 'Publish' the page. (In a later refinement of the workflow, this is intended to be done by a different user group, and so separated by an 'Assign to users' action.)
Am I missing something?
Thanks in advance...

This user help article might help with this http://userhelp.silverstripe.org/framework/en/for-website-administrators/setting-up-advancedworkflow
A good idea is to flow diagram out the workflow you want before setting up the actions and transitions in the module.

Related

Gitlab-ci - Display warning on merge if a given file has been modified

I wish to know if it's possible to display a message when merging a branch with gitlab if a given file has been modified.
To be clearer, if the configuration file has been modified, I might need to update the configuration file on others environment, which is easy to forget. That's why I would like to display "Have you updated configuration everywhere ?" (or something to that effect) every time I merge a branch where the configuration has been modified.
I did some digging, it seems possible to list modified file but so far I have no idea how to display a warning.
Thanks a lot
There is no particular way to raise a custom user-defined warning/message in the MR UI. However, there may be some solutions that might work for you.
Using codeowners
You can use CODEOWNERS and an approval rule that requires approval for codeowners when owned files are modified. That way, every time the file(s) you define are modified, there will be an approval rule that appears in the MR UI. However, it won't include any kind of user-defined message.
Custom approval rule
Another way may be to define a custom approval rule called something descriptive like "did you update the config?" -- however, this would not be conditional based upon whether the file was modified or not; it would show up on every MR.
A custom pipeline job
You could use a custom pipeline job to determine whether a check is needed. This pipeline job, in principle, could make a comment on your MR when it detects the file has changed. Or maybe even analyze if a config file change is needed and fail the pipeline.
A custom service/webhook
For a similar use-case to what you describe, I created an approval rule and a MR webhook for MR events that would, depending on the contents of the MR, automatically provide approval from a bot user whenever human approval was determined to be not required. Though, this requires creating a service to respond to the webhooks.
In other words: if no action was needed, the bot approved the MR for you (satisfying the custom approval rule). If action was required, the bot would do nothing, meaning a human would have to approve to satisfy the approval rule.
Something like a similar comment from a bot user may also work for your use case.
other ways of surfacing information in MRs
Some other features of GitLab cause messages to appear in the UI, so you could (ab)use those features to surface custom-ish messages, like:
Metrics reports in MRs
SAST scanning results in MRs
Maybe some others?

What is the process for changing the "lead owner" through the salesforce API?

Currently creating an automation using zapier which should change the lead owner in salesforce when the event takes place. It successfully reaches salesforce but does not actually change the "lead owner" but it is instead reflected in the lead history section. There is no clear salesforce workflow or rule in place which should prevent this automation from occurring.
When the automation executes as you can see above, the lead owner successfully changes in the lead history but it does not actually change the lead owner of the actual lead so we are manually having to go back and change this.
Has anybody else faced similar issues when working with the salesforce API when changing the lead owner and if so what was the solution?
Check Lead assignment rules. It's separate area in Setup, different from workflows, flows, process builder and triggers.
You probably have an active rule that runs on update, not only on insert. Your API call works OK, changes the OwnerId field but then the assignment rule overwrites that. That's why you see it as 2 entries in history.
You can also confirm what's going on byenabling debug logging on the integration user and check if it captures anything.
Optionally you could also suppress the assignment rule during the update. This is... questionable. I mean talk with your SF admin first, if you suppress the rule then you moved bit of logic out of salesforce. 2 months later nobody will remember why something doesn't fire, it's cleaner to just modify the rule to skip these records.
If Zapier uses SF REST API there's a HTTP header it should send, Sforce-Auto-Assign: FALSE. If it uses SOAP API - similar thing will have to be set in the SOAP message's header, check the WSDL for exact syntax?
We solved this, just broke down the issue and resolved by doing the following (This was beyond the standard salesforce scope of support as we use custom prefill URL's for anybody wondering):
Create a new hidden field called something such as 'tmp_owner'
Assign the new lead owner ID to a new text field called 'tmp_owner' which is hidden on
the lead field to other salesforce org users
Added a salesforce workflow rule when this 'tmp_owner' is populated replace the 'lead owner' field with the data.

Youtrack Custom field for who raised Issue?

I was expecting this to be a simple thing, but I am not quite sure how to go about doing it.
Basically on the current project we are trialling YouTrack and the agile board is great, but they could do with knowing who raised certain issues in case they need to go question them further on the issue. However I cannot seem to find a simple way to display this information.
I presumed it would be a custom field of type user, but it appears that this would manually need filling in and would not just be able to be pre-populated by the user who is making the task.
So is this possible?
Currently you can view only the assigned user's name on a ticket in Agile board.
I've created a task based on your request http://youtrack.jetbrains.com/issue/JT-19118, you are welcome to vote and leave comments.
As a rough workaround, you can configure notifications on created issues in your projects.
In this way, developers will be notified about all created issues and their reporters.
For that, create a saved search (i.e created by: {Testers}), make this search visible to needed group (by clicking "Edit" on the saved search) and enable notification "on issue created" in user's "Profile". Also, user with admin permissions is able to allow this notifications for all needed users by himself(navigate to "Administration" area -> "Users" -> {user} ->"Profile").
Note, that you can receive notifications both via email and jabber.
Thank you.

how do you develop "create site" workflow in SP 2010

i want to try doing this directly in SP2010 designer first. I have never worked with workflow before and haven't found anything that really helped me out online.
Flow:
I go into a global team site. I fill out a form (predefined form i created with specific controls) and click submit (form is validated for input).
Workflow kicks starts sending an email to a user who is defined to approve this workflow.
Once approval is obtained, the workflow completes and creates a Team Site from the information in the initial Form I filled out.
I am sure this is simple for anyone who has been developing workflows, but again this is my first and my first time using SP2010.
Any help starting this would greatly be appreciated. I haven't really found any good examples online for something like this.
We just completed a project exactly like this. We made a list with all the fields necessary to create a site. We attached a custom Approval workflow created in SharePoint Designer and a Workflow Event Receiver. When the Approval workflow finished, the WorkflowCompleted event checked that the workflow outcome was Approved, retrieved the List Item associated to the Task, and passed that List Item to our builder class.

Rehosting the WF4 designer - how to save and execute workflows created through the rehosted designer

I'm looking for some clarity with regards to the use of Windows Workflow 4 in an integrated solution - specifically with regards to rehosting the designer and executing workflows created by eg. a business user.
Is the intention that the required custom activities are created and compiled into a dll, which is then deployed with the rehosted designer, allowing the business user to create/configure workflows that make use of these activities - the business user would then save the workflow as XAML, which can be stored in a location known to the application (database, filesystem etc.), and then when it is necessary for the application to execute a workflow, it can use XamlServices.Load to load the workflow from the specific location and execute it as a DynamicActivity?
How is the workflow saved so that it can later be reserialized with properties and other configuration values? I've tried deserializing a Xaml file saved out of the designer, and also using XamlServices.save().
Are there any potential issues here with using bookmarks/persistence?
As a related question, is there any easy way to "Go back" in a workflow, without defining return branches on every flowchart element? I'm looking at integrating a workflow with a UI for a user to enter responses, which the wf will process, and make decisions based on the input. Through the UI, the user should be able to "Go Back" to a previous input.
You can use the ActivityXamlServices.Load(path) to load a XAML file. It will return an Activity, actually a DynamicActivity, and you can use a WorkflowApplication to run it.
See my blog post for an exmple.