If you have Working Hours configured, for example, Mon-Friday, 8 working hours
Working Hours configured
And in your workflow, you configured an Escalation using the Escalate After template and filled in the Days value. For example, 3 days:
Escalate After template configured with Days = “3”
Your workflow WILL NOT be kicking off the escalation after 3 working days. It seems logical from the configurations, but it is not!
In the back-end, Escalation will convert Days to Hours, meaning 3 days x 24 hours = 72 hours. This will be the number of hours the Escalation is waiting for. When paired with Working Hours (8 hours working day in our example), the final escalation date will be 9 days later ( 72 hours / 8 hours = 9 days). This is how it works!
So, if you are using Escalation with Working Hours, always remember that Days will be converted to Hours to get the final escalation date. Hope it helps!
There are times when you need to write codes in your K2 workflow to provide features that is not available out-of-box. It could be a complex logic processing, sending of formatted HTML email with table contents, etc. In this article, I’m going to show you how to attach to the K2HostServer.exe process to debug your workflow.
Pre-requisite
In your Visual Studio, open the Options dialog (Tools > Options).
Tools > Options
In the Options dialog, select the debugging category and uncheck the option, “Require source files to exactly match the original version” and click OK.
Uncheck “Require source files to exactly match the original version”
Attaching to the K2HostServer.exe process
Deploy your K2 process, if you have not done so.
Open your process in Visual Studio.
Right click on your Default Server Events (Codes), select View Code, followed by Event Item to view the codes.
Default Server Event (Codes) > View Code > Event Item
Add a breakpoint.
Add a break point in your codes.
In the menu, select DEBUG > Attach to process…
DEBUG > Attach to Process…
In the Attach to Process dialog, select K2HostServer.exe under Available Processes. You may need to check the “Show processes from all users” if you are not logged in as the K2 Service account.
Select K2HostServer.exe process
Next, click on the Select… button.
Click on the Select… button
In the Select Code type dialog, select Debug these codes types radio button and check Managed (v4.5, v4.0) and click OK.
Select Managed (v4.5, v4.0)
Click on the Attach button and we are ready to test the workflow!
Attach!!
Note: Don’t worry if the symbols are not loaded after you attached to the process. It will do so when the workflow kicks off.
Debugging
Start your workflow running and wait for the breakpoint to hit. When it does, it is up to your debugging skills to find your problem now =)
Time to debug!
Just a side note, if you are running the K2 blackpearl Server service in console mode, your Console.WriteLines will appear in the console too.
Console.WriteLine shown in K2 blackpearl Server console
A lot of times before a form submission, changes to important values, etc. “Initialize” actions, you will want to prompt the User to get their confirmation on their action like the following:
Some weird logic.. =)
Well.. The above is just for illustration and by no means you should irritate your Users, no matter how you dislike them =)
The Action that allow us to prompt and get a confirmation from the User is the “Get a confirmation from user” Action, which can cheap mlb jerseys be found under the “Notifications” section:
Now, based on the explanation from the production site the “OK” and “Cancel” buttons function like this:
If the “OK” button is clicked, it will process the subsequent Actions.
Click “OK” and the highlighted cheap mlb jerseys section will be processed.
If the “Cancel” button it clicked, it will stop processing subsequent Actions.
Click “Cancel” and the highlighted section will NOT be processed.
When the Action is used in a “If” to condition, clicking on the “OK” button will process the subsequent Actions. Click on the “Cancel” button will process the “Else” condition.
How the Action reacts to “OK” and “Cancel” clicks
It is pretty straight cheap mlb jerseys forward for the above cases, but it is different if Nullam you configure it like the following:
Wrong configuration
In the – sample, message B or C will still be processed after the user clicks on “Cancel” button. This is correct by design, since the production documentation states that it will only stop execution of follow-up Actions. So, an “If” is not an Action and thus will be processed regardless of the button clicked.
To make the above sample work, you will need to wrap Mac the Action within a Condition like the following:
Correct configuration
This setup will ensure that when the User clicks on the “Cancel” button, the “Stop rule execution” Action is triggered and the rest of the Rule processing is aborted. If the User clicks on the “OK” button, the follow-up Actions and Conditions will be processed.
Now, what did I put in the “If an advanced condition is true” Condition?
To ensure this condition always run.
It is a 1 cheap mlb jerseys = 1 condition which will ensure that it will always execute and support our “Get confirmation from user” scenario.
When you Nouvelle add a View to a Form, wholesale nfl jerseys the Form will automatically inherit the Rules from the View and at the same time, automatically adds a “When [View] executed Initialize” Rule. This is regardless whether your View has this Rule at all.
Based on K2 smartforms Implementation Tips, you should “Refactor, clean and simplify Form and View Rules” to speed up development and runtime experience.
Now, this tip is only true if you do not need any Expressions on the View to be evaluated when the Form loads.
Let’s see why:
This is my sample View:
View Design
It has 2 Text Boxes, let us refer to the top Text Box as “Value A” and the bottom Text Box as “Value B”. Lastly, there is a “Addition Result” Data Label, Or which has the following Expression:
Addition Result Data Label’s Expression
When I test this View, I should see that the “Additional Result” gets evaluated correctly.
In the rule, there is an Action running the View’s “Initialize” method.
The Initialize Action
But wait! I did not configure any Initialize Rule on my View earlier. So let’s remove it based on the best practice and view my Form in runtime URL.
Form run time. Note that the “Addition Result” did not evaluate.
Hmm… something is wrong. The “Addition Result” Data Label did not show any value. It Wylick should have, since it has the Expression configured and both “Value A” and “Value B” Text Boxes have values in them.
Updating the “Value A” to 2 kicks off the Expression evaluation and I get the value in “Addition Result”. This shows that the Expression works, just that it did not start evaluating when the Form loads.
After updating “Value A”, the “Addition Result” is evaluated now
Now, of going back to my Form Rule designing page, I put back the Form Initialization Rule that calls on the View’s Initialize method that with I have deleted earlier. After checking in the Form, I try running the Form again.
It works now!
Expression working now!
Great! Now we know God that View’s Expressions will only start running on Form load when the View’s Initialize method is called on. So, it does not mean that we should always remove View Initialize method on Form Rules when there isn’t any actions in it =)
This article wholesale MLB jerseys shows you how to create a selectable Checkbox Views section like the following:
Section collapsed
Section expanded after checking on the section header’s checkbox
Appending the following style to your form’s theme CSS files (Both Designer and Girls Runtime). If you are using the default Platinum theme, then your CSS file will be located at [Path to K2 blackpearl folder]\K2 SmartForms Runtime\Styles\Themes\Platinum.css and [K2 blackpearl folder]\K2 smartforms Designer\Styles\Themes\Platinum.css.
Edit the Form. Add a Table control to the form. Set the column and rows to be 1 x 1.
Add Table control
Add a Label control into the table cell. This label needs to be the first control in the table cell.
You will need to Cleveland Browns jerseys set the Text value to customsectionheader. This is the title attribute value in the CSS selector above.
You should set the control to be not Visible. There is wholesale NBA jerseys no need to display this control t?rténelmének value to the form users.
Add Label control into the table cell
Add a Checkbox control into the table cheap jerseys cell, right after the zumLabel control above. The CSS selector above will use this These combination of Table > Label + sibling Checkbox condition to apply the required stylings.
Add Checkbox control after the Label control
The section header is now ready. Add your Views after this header and apply your rules to hide/show the underlying views when the checkbox Montaditos is checked or cleared. Add wholesale NBA jerseys required child Views
Apply Rules to hide/show Views on Checkbox is changed
Save and test the form!
Final output
Note: You may need to execute an IIS reset to refresh a cached stylesheet.