- .html or .aspx files only
- aspx files have proper DTD – document type declaration
- naming - container aspx file and content html component have identical name
- naming should be "Capability_purpose.suffix", for example popups are PU_SecurityView.html, Entity_CompanyContacts_Detail.aspx
- comments section at the top of every file
- overall HTML architecture (html, head, body, form etc)
- proper indentation of code
- XHTML compliance – closing slashes on images, input, br, etc
- one form tag per page right after body tag
- No name or ID attribute on form elements
- links are absolute
- image files use appropriate names: img, icon, btn, nav, text
- image tags contain alt, width and height attribute
- javascript tags: language and type attributes, variable declarations explicit as var, one statement per line, end lines with semicolon, proper indentation
- no changes to CSS by off- site resource – changes must be made with UI collaboration
- page weight 35K
- no horizontal scrolling at resolutions 800 X 600 or 1024 X 768
- browser support IE 5.0 – 8.0
- "super-set" html content component should have discreet easily hidden components, as stacked tables or TR for conditional rendering – TD will not work for this
- All lists should be width="100%"
- % should not be used on any TD (Except snapshot page template)
- Styles should NOT be used on the TD for any cell containing inputs, selects or required asterisks – use span instead on the text in question or assign the class to the input itself.
Monday, April 19, 2010
Global .NET standards
Visual Studio IDE Shortcut Keys
My favorite Visual Studio keyboard shortcuts
- CTRL+ALT+L: View Solution Explorer. I use Auto Hide for all of my tool windows to maximize screen real estate. Whenever I need to open the Solution Explorer, it's just a shortcut away. Related shortcuts: CTRL+ALT+X (Toolbox), F4 (Properties), CTRL+ALT+O (Output), CTRL+\, E (Error List), CTRL+\, T (Task List).
- F12: Go to definition of a variable, object, or function.
- SHIFT+F12: Find all references of a function or variable.
- F7: Toggle between Designer and Source views.
- CTRL+PgDn: Toggle between Design and Source View in HTML editor.
- F10: Debug – step over. Related debugging shortcuts: F11 (debug – step into), SHIFT-F11 (debug – step out), CTRL-F10 (debug – run to cursor). F9 (toggle breakpoint).
- CTRL+D or CTRL+/: Find combo (see section on Find Combo below).
- CTRL+M, O: Collapse to Definitions. This is usually the first thing I do when opening up a new class.
- CTRL+K, CTRL+C: Comment block. CTRL+K, CTRL-U (uncomment selected block).
- CTRL+-: Go back to the previous location in the navigation history.
- ALT+B, B: Build Solution. Related shortcuts: ALT+B, U (build selected Project), ALT+B, R (rebuild Solution).
- CTRL+ALT+Down Arrow: Show dropdown of currently open files. Type the first few letters of the file you want to select.
- CTRL+K, CTRL+D: Format code.
- CTRL+L: Delete entire line.
- CTRL+G: Go to line number. This is useful when you are looking at an exception stack trace and want to go to the offending line number.
- SHIFT+ALT+Enter: Toggle full screen mode. This is especially useful if you have a small monitor. Since I upgraded to dual 17" monitors, I no longer needed to use full screen mode.
- CTRL+K, X: Insert "surrounds with" code snippet. See Snippets tip below.
- CTRL+B, T: Toggle bookmark. Related: CTRL+B, N (next bookmark), CTRL+B, P (prev bookmark).
Friday, April 16, 2010
Welcome to Blackpearl workflows
Hi, I would like to post few articles about Blackpearl workflows in my blog. I am going to discuss about this siubject starting from basics with some practical examples. You might ask,
what is a workflow?
The answer is simple "A workflow consists of a sequence of connected steps".
why we need them?
We need them for "The automation of a business process, in whole or part, during which documents, information, or tasks are passed from one participant to another for action, according to a set of procedural rules".
The actions are the decisisons taken by the user when a Task is assigned to him/her. I should say there are three main actions, they are: 'Approve', 'Decline', and 'Rework'.
For example, in retail business to buy a product.....
what is a workflow?
The answer is simple "A workflow consists of a sequence of connected steps".
why we need them?
We need them for "The automation of a business process, in whole or part, during which documents, information, or tasks are passed from one participant to another for action, according to a set of procedural rules".
The actions are the decisisons taken by the user when a Task is assigned to him/her. I should say there are three main actions, they are: 'Approve', 'Decline', and 'Rework'.
For example, in retail business to buy a product.....
Thursday, April 8, 2010
Update DataFields for K2 Blackpearl workflows
Hi,
Here I am going to discuss about the K2 .net 2003 and BlackPearl (BP) workflows DataFields those help in repairing the workflows those got into error state. As we all know DataFields in workflows plays a big role in carrying the transactional data that are useful for decision making in workflow activities, especially in deciding line rules (Off course in BP we have actions to decide lines rules).
When I started working BP workflows few months back, I observed that fixing BP error workflows is not that easy as compared to K2.net 2003. Usually in K2.Net 2003 we add some condition related to process Instance ID (ProcInstID) and repair the error. Even thought BP has provided that ability to do it from Visual studio, it is not that easy to repair them as BP workflows uses XOML internally and every time we repair this error it deploys a new version workflow ( we can see this in version window of workflows in workspace). I didn't like this as this is risky thing to do this. Finally I found some way using APIs and updated the DataFields and repaired the workflows by just updating the DataFields. It was so easy.
Here is the code:
protected Connection GetBPConnection()
{
SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder connectionString = new SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();
//connectionString.Authenticate = true;
connectionString.Host = "localhost";
connectionString.Integrated = true;
connectionString.IsPrimaryLogin = true;
connectionString.Port = 5252;
Connection connection = new Connection();
connection.Open(txtServerName.Text, connectionString.ConnectionString);
return connection;
}
protected void UpdateBPFields(string strFieldName, string strOldValue, string strNewValue)
{
SourceCode.Workflow.Client.ProcessInstance objBPProcessInst;
using (Connection connection = GetBPConnection())
{
//Create process instance
objBPProcessInst = connection.OpenProcessInstance(Convert.ToInt32(txtProcInstID.Text));
foreach (DataField dField in objBPProcessInst.DataFields)
{
//Check which FataField you want to update
if (dField.Name == strFieldName)
{
dField.Value = strNewValue;
}
}
// Call Update Method to update the DatField value
objBPProcessInst.Update();
}
}
For this utility you need to know the ProcInstID workflow which is gone into error state. This is easy to get them, in error profiles each workflow error shows the ProcInstID in the gird, as below.
Even we can do the same thing for K2.Net 2003 workflows.
This process not only helps for Error Workflows but for Active workflows. Sometimes, we might need to update some DataFields to change some rules after workflow started. The same process can be applied for K2.Net 2003, but the name spaces will be different (K2ROM.dll). For active workflow you can get the process Instance ID from workspaces (when you keep the mouse on workflow “ViewFlow” button you can see the ProcInstID in status bar, for K2 and BP workflows).
For K2 Error workflows you can see the ProcInstID directly in Error profile like below.
Hope it helps!
Here I am going to discuss about the K2 .net 2003 and BlackPearl (BP) workflows DataFields those help in repairing the workflows those got into error state. As we all know DataFields in workflows plays a big role in carrying the transactional data that are useful for decision making in workflow activities, especially in deciding line rules (Off course in BP we have actions to decide lines rules).
When I started working BP workflows few months back, I observed that fixing BP error workflows is not that easy as compared to K2.net 2003. Usually in K2.Net 2003 we add some condition related to process Instance ID (ProcInstID) and repair the error. Even thought BP has provided that ability to do it from Visual studio, it is not that easy to repair them as BP workflows uses XOML internally and every time we repair this error it deploys a new version workflow ( we can see this in version window of workflows in workspace). I didn't like this as this is risky thing to do this. Finally I found some way using APIs and updated the DataFields and repaired the workflows by just updating the DataFields. It was so easy.
Here is the code:
protected Connection GetBPConnection()
{
SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder connectionString = new SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();
//connectionString.Authenticate = true;
connectionString.Host = "localhost";
connectionString.Integrated = true;
connectionString.IsPrimaryLogin = true;
connectionString.Port = 5252;
Connection connection = new Connection();
connection.Open(txtServerName.Text, connectionString.ConnectionString);
return connection;
}
protected void UpdateBPFields(string strFieldName, string strOldValue, string strNewValue)
{
SourceCode.Workflow.Client.ProcessInstance objBPProcessInst;
using (Connection connection = GetBPConnection())
{
//Create process instance
objBPProcessInst = connection.OpenProcessInstance(Convert.ToInt32(txtProcInstID.Text));
foreach (DataField dField in objBPProcessInst.DataFields)
{
//Check which FataField you want to update
if (dField.Name == strFieldName)
{
dField.Value = strNewValue;
}
}
// Call Update Method to update the DatField value
objBPProcessInst.Update();
}
}
For this utility you need to know the ProcInstID workflow which is gone into error state. This is easy to get them, in error profiles each workflow error shows the ProcInstID in the gird, as below.

Even we can do the same thing for K2.Net 2003 workflows.
This process not only helps for Error Workflows but for Active workflows. Sometimes, we might need to update some DataFields to change some rules after workflow started. The same process can be applied for K2.Net 2003, but the name spaces will be different (K2ROM.dll). For active workflow you can get the process Instance ID from workspaces (when you keep the mouse on workflow “ViewFlow” button you can see the ProcInstID in status bar, for K2 and BP workflows).
For K2 Error workflows you can see the ProcInstID directly in Error profile like below.

Hope it helps!
Subscribe to:
Posts (Atom)
Access to XMLHttpRequest at 'from origin has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. .net core angular
Issue: The angular application was getting error from API that the origin has been blocked by CORS policy. Solution: Make sure that the...
-
While Working on a VisualWebPart with Telerik Controls I got a Security Exception. I searched many blogs and articles, and found some i...
-
Trying to use the Oracle Data Provider for .NET ( ODP.NET ) with Entity Framework (EF) results in the following error: System.Data.Pro...
-
We had an issue while updating the datafield values without executing the action in the application form. If we use ProcessInstance Updat...