nathanwoulfe / plumber Goto Github PK
View Code? Open in Web Editor NEWThe workflow solution for Umbraco 7
The workflow solution for Umbraco 7
Hi @nathanwoulfe,
I'm digging in this plugin deeper and deeper so sorry if I flood you with these comments, but I also noticed if I set a group of approvals by document type this is not going to work in sense that on the label tells me(after I choose workflow configuration on a node) <Approval flow can be set by content type - this flow takes priority over any inherited flow.> but this groups doesn't get notified if I have set something for the current flow, would be nice that this approval option by content type would take priority over anything else set on the node.
Here is my scenario what I want to achieve and maybe you will understand it better.
I have a Home Page in the root(backoffice) and I want for this particular node to have a separate group of approvals, but also in the same time I want to define a General Approval Groups for the child nodes, with the current functionality I could set both, but the content-type group of approvals doesnt get notified.
We would love to make this because we don't have to go over each child node and set the current flow, would be much more convenient to set on root node and the inheritance will do the work and in the same time we would have a separate group that approves the Home page(root).
So this is the only thing, that would be nice to have - if I set any group on content type in workflow settings that/those group should be taken place for that content type. I'm not sure if this could be achieved or it just too complicated.
Let me know your thoughts!
And another bug, once I inserted a group for a node and hit ok, if I want to take that group out from the node and jus leave it empty the current flow, it doesn't allow me to save, in terms on clicking Ok nothing happens, but if I add back any group it will do the save.
Thanks,
Botond
should link into the history view, processes already exists, just need to filter them.
System emails are generated from pre-defined strings, replacing page name, user name etc - would be nice to allow these to be customised, with a defined set of values to include
Currently needs two steps - add the type, then edit the flow. Should be able to do both from a single overlay, where the type is selected from a dropdown rather than using the content type picker overlay.
@nathanwoulfe I am using "Umbraco 7.7.1" with a package "Plumber 0.2.0".While after editing and clicking button called "Request To Publish".It is showing an error in console probably. I am attaching the same along with this POST.
Please click following for more details
Why Do the user 1st Stage approve the full workflow and not pass to 2nd stage user?
I received two separate error messages in the Umbraco Cloud error log after installing the extension. The extension appears to still work OK, but I've listed the error messages below.
Message:
Error running Plumber migration
Exception:
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'WorkflowInstance'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass5_0.<ExecuteReaderWithRetry>b__0() at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func
1 func)
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy)
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy retryPolicy)
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command)
at Umbraco.Core.Persistence.Database.d__1151.MoveNext() at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)
at Workflow.Repositories.InstancesRepository.GetAllInstances()
at Workflow.Services.InstancesService.GetAll()
at Workflow.Migrations.VersionZeroFourZero.Up()
at Umbraco.Core.Persistence.Migrations.MigrationBase.GetUpExpressions(IMigrationContext context)
at Umbraco.Core.Persistence.Migrations.MigrationRunner.InitializeMigrations(List`1 migrations, Database database, DatabaseProviders databaseProvider, Boolean isUpgrade)
at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, DatabaseProviders databaseProvider, Boolean isUpgrade)
at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, Boolean isUpgrade)
at Workflow.Events.Handlers.Migration.DoMigration()
ClientConnectionId:046fb746-48ac-4a82-8b70-186b16fb8091
Error Number:208,State:1,Class:16
and
Message:
Exception (da54c158).
Exception:
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'WorkflowInstance'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass5_0.<ExecuteReaderWithRetry>b__0() at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func
1 func)
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy)
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy retryPolicy)
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command)
at Umbraco.Core.Persistence.Database.d__115`1.MoveNext()
ClientConnectionId:046fb746-48ac-4a82-8b70-186b16fb8091
Error Number:208,State:1,Class:16
Inside of workflow.history.controller.js the setPaging() function calculates the totalPages to be resp.total / resp.count but this leaves decimal points in the value. It needs to be Math.ceil(resp.total / resp.count) I believe because the umbraco.directives.js for umbPagination has maxIndex = scope.totalPages - 10 which totalPages has a decimal number in it. It calculates the start variable as start = Math.max(scope.pageNumber - 5, 0). It then figures out it's starting point by doing start = Math.min(maxIndex, start) Once maxIndex becomes less than the start variable the decimal point numbers begin to be used for the page numbers and Umbraco starts throwing errors. We didn't notice the issue until our history in workflow was over 290 items. It probably happened sooner but we didn't notice it until trying to go past page 26 displaying 10 items per page.
Reproduce by adding a workflow group to a node (ie setting an explicit flow), save, then remove the group and try saving with no settings on the node.
If an item is in a process, but is scheduled for a future date, it should be permitted to add a subsequent workflow.
Not sure how to then manage the versioning - updating would require a save, which would update the pending workflow. Option might be to store the versioned properties on the instance, and push back onto the content model when approved.
In a normal Umbraco install, when I click "Save & Publish", I see a spinner on the button that stops spinning once the publish is complete.
The "Request publish" button seems to initiate a publish, but it doesn't have a spinner. That's problematic on the site I'm currently working on, as the publish operation takes like 10 seconds, so the user doesn't get feedback during that time.
I know, 10 seconds is a long time, but it's not a typical site (it generates static files for the entire site on publish).
Umbraco 7.7.9. Workflow.Umbraco/Plumber 0.5.1.
Fetching documentation requires an internet connection - if none exists, user sees the server error overlay
Should be returning a friendly message to the UI
Here is article explaining it : https://cultiv.nl/blog/using-umbraco-migrations-to-deploy-changes/
Will try to create a PR next week for it
Hi.
I was interested in trying out your workflow plugin for Umbraco; it sounds like exactly the kind of thing I'm looking for.
However when I tried logging into the admin panel on your demo site (as TestUserA), I just got an endless stream of "Oh Snap" error messages scrolling past faster than I could even read what they said.
ps - I found out about it on a thread at our.umbraco.
If an author sets a release date on a node and submits for publishing, the node will publish when the release date passes, regardless of the workflow state, allowing the workflow to be circumvented.
Will need to add a beforepublish handler, to check if the node has a release date and an active workflow - if it does, the publish should be cancelled. The document publish process manages publish now vs at, by setting the instance to complete and not explicitly calling publish, allowing the scheduler to handle it later.
Hey,
I tried cloning the repo and launching the demo site but there are a few issues with it. I think that they config files are missing. The config folder is still part of the csproj so it shows up in my VS but the actual files don't exist. This then causes the error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unable to open configSource file 'config\umbracoSettings.config'.
Line 21: </sectionGroup></configSections> Line 22: <umbracoConfiguration> Line 23: <settings configSource="config\umbracoSettings.config" /> Line 24: <BaseRestExtensions configSource="config\BaseRestExtensions.config" /> Line 25: <FileSystemProviders configSource="config\FileSystemProviders.config" />
Also the demos site login appears to be out of date. Took a look at the db file and there is no such user.
Thanks
So i updated/reinstalled the plugin but it seems that the overview for the editor is not visisble on the content node
TODO -> add email generation from cshtml files, to allow customising the system notifications.
https://harveywilliams.net/blog/rendering-mvc-emails-with-cshtml is a good starting point for parsing the razor into a string. Would need to add a UI to allow setting the fields for inclusion in the email, determined by the available fields on the group and instance models. Any properties on those should be able to be included in the email, using curly braces or something:
{{group.name}} {{user.name}} {{instance.node.name}} etc...
Could then allow markup in the email for branding etc. Razor template example included in forms is useful too.
Hi Nathan
Unless I'm doing something wrong - entirely possible - it looks like some extended or custom data types do not get saved with Plumber save button, i.e.
If that is in fact missing for now, and custom code needs to be added for each of those property editors, can you point me in the right direction about where to implement them - and eventually submit a PR?
Thanks!
Doing so would mean adding/modifying settings wouldn't need a migration and will make adding new settings simpler.
I noticed that, when the last approver in a workflow accepts a content item for publishing and the publish process runs, the dashboard does not present any kind of busy indicator to show that it is working. This is problematic if the publish process takes a long time. Umbraco has that default loading indicator element () could you maybe throw that up while the publish is running?
Hi Nathan
This may be related to the changes in #45 , but I'm opening a separate issue because it's a different problem.
I rolled back my website (database, folders, everything) to my original installation - Umbraco 7.10.4 without Plumber.
I then installed the latest build https://ci.appveyor.com/api/buildjobs/xxrdy8a1o6v4lump/artifacts/BuildPackage%2Fartifacts%2FPlumber_0.7.10-rc-000210.zip and configured an approval group
When I try to configure the workflow in any node, it looks like the configuration is saved:
... and after clicking OK
In fact, while I remain in that same node, the button behaves as when a workflow is active (Save => Request Publish).
But when I move to a child node and check the configuration, no workflow is inherited. And when I go back to the parent, the workflow configuration is gone - and the button reverted to the default Umbraco options.
UPDATE: by "gone" I mean that the "Workflow configuration" action is still in the node drawer, but the configuration is empty - no content approval flow.
Great work with this package! Thanks!
Small issue: although it looks like the Default Approval Group has been removed from the Settings and the docs, the Workflow Configuration action in drawer still reports the warning mentioned in the title.
I'm using a fresh install of the package v0.7.9.
Thanks,
Jose
Hi Nathan,
i can see it very clear that when i debug from source code it will works without errors but only small issue with final stage refresh not happening.
to reproduce : click U3 as approve in third stage(final stage) and able to publish the content and still button remains same as approve changes.
when page refresh it vanishes.
![enter image description here][1]
also let me know how can i push the source code to server environment.
Installing by local didn't work.
Please suggest me on this.
Umbraco 7.7.9. Plumber 0.5.2.
I wasn't getting notification emails on workflow events (e.g., request for approval to publish), and I noticed this in my error log:
2018-02-05 17:40:51,249 [P11392/D7/T19] ERROR Workflow.Helpers.Notifications - Error sending notifications
System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at Workflow.Helpers.UrlHelpers.GetFullyQualifiedEditUrl(String partialUrl)
at Workflow.Helpers.Notifications.Send(WorkflowInstancePoco instance, EmailType emailType)
Seems like the site URL configuration was the source of the issue:
I had configured, for example, "mysite.localhost", which seems to match what is indicated in the description (i.e., "www.domain.com"). Once I changed that to "http://mysite.localhost/", email notifications started working.
I'm thinking one or both of these could happen:
Hi,
So i have found a issue with using plumber and Umbraco Forms 7.0
First the specs:
Plumber: Latest version Umbraco: 7.10.1 Umbraco Forms: 7.0.0
When configure the workflow of the Umbraco Form the following angular exception is trowed!
TypeError: mainTreeEventHandler.syncTree is not a function
at Object.syncTree (umbraco.services.js?cdv=1329554360:5238)
at umbraco.controllers.js?cdv=1329554360:8866
at angular.min.js?cdv=1329554360:108
at e (angular.min.js?cdv=1329554360:31)
at angular.min.js?cdv=1329554360:34
(anonymous) @ angular.min.js?cdv=1329554360:63
angular.min.js?cdv=1329554360:63 TypeError:
workflowResource.getAllWorkflowTypesWithSettings is not a function
at init (umbraco.forms.js?cdv=1329554360:2903)
at c.WorkflowTypesOverlayController (umbraco.forms.js?
cdv=1329554360:2977)
at d (angular.min.js?cdv=1329554360:28)
at Object.instantiate (angular.min.js?cdv=1329554360:28)
at angular.min.js?cdv=1329554360:53
at angular.min.js?cdv=1329554360:44
at n (angular.min.js?cdv=1329554360:7)
at k (angular.min.js?cdv=1329554360:44)
at e (angular.min.js?cdv=1329554360:40)
at angular.min.js?cdv=1329554360:39
When creating an approval group, I get the JavaScript errors "section cannot be null" and "No childNodesUrl property found on the tree node, cannot load child nodes" in my Chrome console.
This prevents the creation of approval groups when "Approval groups" is selected. Also, it seems like the creation of approval groups fail otherwise (i.e., when I don't have "Approval groups" selected in the tree), but once I refresh the page I see the approval group.
Review this.
Add an option to allow a node in a workflow to be modified by the responsible group
Can you made with a different colour the reject / submitted point ?
Hi @nathanwoulfe,
The issue I've discovered related to the database table(WorkflowTaskInstance) and the approval Groups, this happens if a workflow approval group gets deleted, but it has already activities inserted in the table and later when you go back to the history tab in workflow settings you can not view the list because of Object reference error happens. But after I've deleted the records from the above mentioned table that points with idgroup which doesn't exist anymore the history tab starts working again.
Maybe a cascading rule on delete would help, or if you want to save the history then we shouldn't delete the group, just set a disable flag on that group.
Thanks,
Botond
I got this error message when testing out Plumber 0.4.1 today on fresh install of Umbraco 7.7.9 (using the starter kit) with a SQL Server database:
Error saving config. Column 'GroupId' does not allow DBNull.Value.
Here's a screenshot of the error:
And here's the text version of that stack trace: sql-stack-trace.txt
This happened when I was configuring the workflow on the homepage (as shown on the left of the screenshot). Basically, I configured two groups (Content Approver and Legal Approver), but then I wanted to insert one before those two groups. So, I added the third group (Editors), then removed the two existing groups and added the back again (so they'd be in the correct order). When I tried to save, I got this error.
I refreshed the page and I noticed the workflow was empty. When I added all 3 groups back, I was then able to save without an error.
Hi Nathan,
@nathanwoulfe
When i initiate workflow from authors when i click on request to publish below error was displaying.
Also i have a doubt ex U1 is at stage 1 to approve , so do i need to give send to publish from groups section else It will automatically will override the existing permissions present in the work flow.
Ex: U1 ->group only update,publish if the U1 in workflow will this be allowed to send for approval or directly will publish.
Thanks,
Pradeep
Hi @nathanwoulfe,
I would have a question related to the umbraco default Publish Button, when we install the plumber workflow plugin, all users can see only the preview and save(or Request to Publish) buttons, which are fine and work, but also for users who has superior privileges would be nice to have this default publish button available too, in the right down corner as umbraco generally has. I mean, now, for example if a user want to publish a document after he save it he needs to go the Action dropdown button and select from there the publish options, so this functionality is available with the workflow configuration too, but would be nice to show this publish button by default for users who can still publish the current document.
Is that makes sense for you?
Thanks,
Botond
We are setting up a new site, that has approximately 40 doctypes that will all be on the same workflow. It would extremely helpful if there was a way to add them all to the same approval process in one go, instead of having to do them one at a time.
Hi @nathanwoulfe,
I think this is not a big change but also would be ok, to change the Request submit button to change to Cancel workflow likely we have already I mean now it's changing only if I got refresh the page, but I think this can be done right after the workflowoverlay is closed.
Thanks,
Botond
I wanted to test plumber and im pretty impressed :)
I installed newest umbraco 7.9.2 and latest Plumber, together with the latest Umbraco starter kit. It only shows 5 doctypes to select from. I tried creating a new but that one dosnt show up either.
On notify send when workflow approved and completed the notification email doesn't get sent becuase email is empty and it throws error.
Thanks
There is a little issue in the Settings side, that I just discovered. When you go in the Workflow Settings in Approval Groups and made some changes there after you hit the save Group button when you want to go to another place like Content directly there is a message that pops up telling me that I didn't save the content(this message is the default umbraco behavior when you edit the content and didn't save it) and if I want discard the changes either want to stay. I think some service needs to be notified in umbraco services to let them know we saved and can move forward.
Thanks,
Botond
In hindsight, this setting is not necessary - there's no sensible reason to have a user in multiple groups in the same workflow. If a user (who is also the change author) is in multiple groups, the task at that stage should approve automatically - approval is implied by the fact it is the same user.
There's also a potential issue with this when the change author is the single member of the final group in a workflow, and the type is set to anything other than All - the author won't be notified nor will the pending task display in their dash, and hence goes unapproved.
Plan is to remove the flow type option, and replace it with an option to allow stages to approve automatically if the original change author is in the approval group.
It's possible for an admin-level user to delete a node while it is in a pending workflow - this causes a front-end error as the node is referenced when building the dashboard views.
Need to check that the referenced node exists before adding the workflow instance to the response object. These cases should also be displayed in the workflow section, or add an option to the workflow history to delete processes.
I just installed Plumber 0.5.1 into a real Umbraco 7.7.9 website by installing the "Workflow.Umbraco" NuGet package.
One thing I noticed that was different from my test install is that no "Workflow" dashboard was installed in the content section. I was able to copy the relevant portion out of the dashboard.config
of my test install to get it working, but odd it wasn't installed.
Two theories:
dashboard.config
with XSLT that expects StartupDashboardSection
to exist (I had that section commented out).dashboard.config
.Hi Nathan,
stage 4 of 3 issue still exists,due to the multiple submit enabled in button drawer.
please find the attached url for workflow reproduced scenerio.
https://drive.google.com/file/d/1QpQwcROUz4XPb_lFsVNanwu-OaSCKCs8/view
Umbraco 7.7.9. Plumber 0.5.2.
I've setup a basic workflow with 2 workflow groups configured to approve content changes. I went through the workflow and tested the email notifications. Here's the final notification I got (when the final approver approved the content and it was published):
Here are the issues I'm noticing with this email:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.