Introduction: The Process Framework Administration Tool (PFA@) is one of the most
interesting tools in ArcFM. This tool mainly takes complete control over
various extensions and in my experience it’s over Session Manger(SM*) and
Workflow Manger (WFM*).
When I say complete control, I really mean the complete
workflow of both the extensions from the start till the end or in simple
language the lifecycle of the extension in action.
I would like to share in this post the configuration
involved within this PFA@
tool either for SM* or WFM*. There are pretty much interesting facts within
this PFA@ and I love to
share them all in this article.
Get started --
The main role of PFA@
tool is that to manipulate the table at the back drop in the DB which controls
the workflow of these extensions. This is just an UI for you to manipulate or
to get your business requirements solved with the extensions.
In the PFA@
tool, one will be encountering lots of tabs as seen in the screen shot below.
Each of these tabs is each of different themes but all are
interrelated to each other. A business requirement can only be completed by
having proper configuration of all these tabs. Any one mistake in these tab or
failed to set a value or user or his role, the business requirement would fail
even the workflow too.
USERS --
Once you log into the PFA@ tool the very first tab should be dealing with is USERS tab. Under this tab an
administrator can add his users who might be eligible to edit or handle any
session or a design in ArcMap. The key
point in here is that both the PFA@ tool and SDE should share same users
between them. It doesn't mean that you cannot ad a new name here but it's
worthless adding a name or user without having the same one in SDE.
User Name# – The user id of any user.
Display Name -
Will be the values that would be displaying in the SM* or WFM* UI in ArcMap.
Description –
Description of the user.
Below the list of Users or the user names we have the roles
listed out. Before explaining Roles, you can assign the role of each individual
user, say “User1” can edit, “User2” can approve a design or session, “User3”
can reject. Similarly it’s possible for a user to have multiple roles assigned
to him based on the business requirement.
ROLES --
Under this tab we
can assign create or add roles, whereas the same should be shared in SDE in
case of enterprise GDB as discussed earlier. Assigning these roles to a user
means, as described earlier, which is eligible for what action to perform.
Role- The login name of the user.
Role Name – Name
displayed in the SM* or WFM* UI.
Description- Description of the role, if any.
Extension -
The value under the EXTENSION field denotes that for what extension this role
is applicable, if configured for SM* this role would only be applicable for SM*
i.e. MMSessionManager but not for WFM*. Similarly if you have WMF or Designer
license we would have further more roles in the same list.
States is one of my
most interesting tabs in PFA@. The states of a session or a design denote
or mean the status of the SESSION or DESIGN. Say a user created a design
and the current status of the design immediately after creation may be DESIGN CREATED, after creation of the
design the user gets down to design by now the status of the same design may be
DESIGN IN PROGRESS and as this
designer workflow progresses the state of the design keeps changing (as
configured).
We have room for
any design or a session to move from any state to any state and this room
availability is purely allowed by PFA@ tool. The configuration
in PFA@ can help you move the states from any state
to other.
Node Type –
the Type of node that the state should be available for. For example in SM* UI,
all the controls you see are considered as a node but the node type
differentiates them. A PxControl is also a node, a PxFilter is also a node but
all the type differentiates. So, the value under the NODE TYPE filed sets to
which node the state should be applicable.
State Name –
Name of the state of the value that appears in the UI in ArcMap.
Description – Any
meaningful description for you state.
Control -
Apart from the states, this STATES
tab is also holds control over the PxControl. As per the screen shot below
“Session UI” is the ArcFM OOTB PxControl. Still you can customize your own UI
as per the requirement. Can read about creating and configuring custom
PxControl http://rrajeshh.blogspot.com/2012/01/arcfm-snippet-5-implementing-pxcontrol.html
Bitmap – You
can define your own icon or symbology for your session or designs based on each
state other than ArcFM OOTB. This is again an option to the users to customize
their application to maximum.
As like the USERS tab STATES tab too
has ROLES listed here, again this is to have control over your requirement. You
can define who can have what state or who can view a session of a particular
state. You can control a user to view a session of a particular state.
In a simple scenario let us consider we have THREE USERS
1) Session Editor
2) Session Approver and 3) Session Administrator,
THREE STATES
1) In Progress 2) Pending Approval and 3)
Session posted
And the ROLES allotted
for each state are as below
In Progress –
Session Editor
Pending Approval
– Session Editor and Session Approver
Posting in
Progress – Session Approver and Session Administrator
Scene 1 – the editor creates a session with name
“TEST SESSION”. Once after successful creation of the session. The state of
“TEST SESSION” will be In Progress. This session will only be visible
for the Session Editor, because the role property of the state (In Progress) has been assigned only to
the Session Editor.
Scene 2- He starts editing, by now the state of the
session will be In Progress and once after he completes the his editing
he submits or send his session to the SESSION APPROVER for validating or
for any approval, by now or once the session is sent to the session Approver
the session's state will be Pending Approval which would only be visible to Session Approver and Session
Editor as because of the roles assigned to Pending Approval state in PFA@
configuration. It is sure that both Session Editor and Session
Approver can get the “TEST SESSION” listed in their respective SM* UI because of
the same above reason. Whereas the TEST SESSION will not be listed for
Session Administrator in his SM* UI.
Scene 3 – The Session Approver is happy with the
edits and he is sending the same session “TEST SESSION” to Session Administrator to post it to SDE.Default. Once he sends the
session to the Session Administrator. The session will no longer be listed for
SESSION EDITOR but for both SESSION
ADMINISTRATOR and SESSION APPROVER. Because the state of the session now
would be “Posting in Progress” and only because of the roles assigned to this
State.
Here what we have
seen is a very simple scenario; still we can have many states within the very
same short story. Let's say if the edits made by the session Editor is not good
and the Session Approver thinks to send it back to the editor for rework. In
such case, we can have one more state as “Session
Rejected” or “Rework” etc and the roles can be assigned to Session Editor
as the Session Approver has nothing to do with that session while rework.
Make use of the add
button and add any number STATES.
Note: Even if you
want a separate state between creating and editing a session yes, still you can
have. The action of states is not done within the STATES tab, as we have
understood earlier all tabs are interrelated with each other. The discussion we
have above is just to understand how a state would work but we are yet to
understand how other factors are controlling the states and how state would
control other TABS.
During customization one can access these states as below
Type appReference
= Type.GetTypeFromProgID("esriFramework.AppRef");
object appRefObject =
Activator.CreateInstance(appReference );
IApplication applicationPx = appRefObject as Iapplication;
IMMPxIntegrationCache
mmPxIntegrationCache = applicationPx.FindExtensionByName("Session Manager
Integration Extension") as IMMPxIntegrationCache;
IMMPxApplication mxApplication =
mmPxIntegrationCache.Application; IMMEnumPxStates states=
mxApplication.States;
IMMPxState
eachState= states.Next();
TRANSITIONS --
Each State change
we discussed earlier is only because of the Transition. In Scene 1, we
have seen the editor creates a new session to make his edits. Once he creates a
new session “In Progress”
happens to be the state while he created a session or in editing mode (as per
our story). So, behind the scene it’s really the transitions that have brought
in the change. The screen shot above depicts the same
For the transition SESSIONCREATE, the ROLE Property is SESSION EDITOR (don't mind Redline
Technician). It's because as per our simple scenario only a session editor is
creating a session so the role for the transition SESSIONCREATE has been
assigned to a SESSION EDITOR but no other.
Also, on the right side we have two other properties for the transition i.e. FROM STATE and TO STATE. These two properties are the way finder for any transition; this tells the transition to move in which direction. Coming back to the same scene 1 in our scenario the session editor creates a session and the transition SESSIONCREATE will be called and the transition will look for the FROM and TO STATE property, as in the picture above it has configured from NONE to IN PROGRESS. So this transition allocates the state for the “TEST SESSION”. The same method is followed for other state changes too e.g. Pending Approval etc.
Also, on the right side we have two other properties for the transition i.e. FROM STATE and TO STATE. These two properties are the way finder for any transition; this tells the transition to move in which direction. Coming back to the same scene 1 in our scenario the session editor creates a session and the transition SESSIONCREATE will be called and the transition will look for the FROM and TO STATE property, as in the picture above it has configured from NONE to IN PROGRESS. So this transition allocates the state for the “TEST SESSION”. The same method is followed for other state changes too e.g. Pending Approval etc.
A FROM property can
have any number of TO association and vice versa. Based on any business
requirement we can have any number of transitions and any combination of FROM
and TO state property.
Click on the ADD
button to add a new transition.
The value under
Transition is the transition Name
The value under Transition
Name is the Name of the transition which would appear in GUI
The value under
Description is the description for your transition.
The value under
Node type is that to say on which node type the transition should act.
NODE TYPES --
A node type is a name
given to any node with common process flow.
The value under the
ID Field is the ID of the Node type.
The Value under the
Node Type is the type of node.
The value under
Description is the description for your Node type.
The value under the
Extension is extension to which the node type is of.
The value under
Deleter and Version Names allows you to assign Deleter and Version Namer
objects to a node type. You may select a deleter or version namer from the
pull-down menus in each field. These menus are populated based on components in
the M&M Process Framework Deleter and M&M Process Framework Namer
component categories.
Deleter
objects coordinate the deletion of node data in the Process Framework with
deletion of data in ArcMap. Enter the Deleter object's ProgID in the Deleter
Prog ID field to enable it for the selected node type.
Version Namer
objects determine a logical name when a new version is created for a node.
Enter the Version Namer object's ProgID in the Version Namer ProgID field to
assign it to the selected node type.
Session Manager Node type
Workflow Manager Node types
TASKS --
Tasks are director of the complete workflow, irrespective of
SM* or WFM*. Each Task performs one or serious of actions, and that one or
serious of actions are the SUBTASKS. In other words a PxTASK is nothing but the
collection of SUBTASK (IMMPxSUBTASK). Looking back our scene 2, it is a TASK of a session editor to send his edits to the
Session Approver, but behind this task we have couple of subtasks working viz.
Subtask to set the state and Subtask to change the owner of the session.
Each node type can have a set of tasks (which are made up of
subtasks) associated with it. Only tasks associated with a node type can be
invoked by a node of that type. If the same task is applicable to more than one
node type, each node type must have a separate task defined and configured.
For adding a new task you can click on ADD TASK and add a
new task, certainly as discussed earlier a TASK is a combination of subtasks.
Before getting down to configure a new task or a subtask,
let's discuss on creating a new subtask “CHANGE SESSION OWNER”. The code below
I have shared is just to replicate the following screen shot but do not expect
the code to function properly.
Implement IMMPxSUBTASK
to create a Subtaks
public class SetStateForMySession : IMMPxSubtask, IMMPxSubtask2
{
/// <summary>
/// <summary>
/// <summary>
/// Object to read the
value from the process manager
/// </summary>
private object _value1;
private object _value2;
/// Method which ENABLES the subtask. If returned
false the Subtask will not be enabled for execution. Which may affect the
following Subtask also making your TASK to fail.
/// Method which EXECUTES the subtask. If
returned false the Subtask will not be executed. Which may affect the following
Subtask making your TASK to fail.
/// Method return the
name of the subtask
// Method which
identifies the Extension for the subtask
/// Method which takes
the Parameter names
}
}
}
}
OOPS, you forgot to register your Subtask ;)
Once after successful creation of a custom SUBTASK, the
following steps are to configure them to see in action.
1 Enter a task name and description.
2 Check the Visible in Task Tool checkbox if you want the
task to be shown in your Process Framework extension (such as Session Manager).
If this checkbox is selected, the user has the necessary role to perform the
tasks, and all of its criteria to be enabled are satisfied, the task will
appear in the Task Tool. Uncheck this field if you wish to hide a task.
3 Use the bottom window the add subtasks to your task. The
up/down arrow buttons allow you to arrange the subtasks in the order you want them
to execute.
4 If you select a subtask that contains parameters, you may
designate the parameter values. In the example below, the Change Owner by Role
subtask contains a Roles parameter. The subtask will return a list of users
filtered by the parameter value entered in the Parameter Values field. The
sample parameter below uses the Role field (on the Roles tab). When configuring
the task, the user may enter a value to determine who the list of users is
filtered. For information about custom subtasks, refer to the ArcFM Solution
Developer Help, Customize Process Framework section.
5 Select a transition or a task role. If you select a
transition, that transition and the roles assigned to it will be used. If you
do not select a transition, you may apply user roles using the task roles
field.
6 Click OK to save the task.
7 On the Node Types tab, the Order button allows you to determine the order in which the tasks appear in the Task tool in you extension.
FILTERS --
Filters are one of the useful tool for a user in SM* and WFM* UI. It filters out the sessions or designs based on a user, state etc. Yes, we have room to create custom filters based on busniess requirement. Again roles can be assigned to a particular filter by which that particular user has accessibility for that particular filter.
When you talk about
creating your own custom filter use IMMPxFilter
and IMMPxFilterEx to create a custom
filters.
Do not fail you register your filter
Miner.ComCategories.MMFilter.Register(regKey);
Miner.ComCategories.MMFilter.UnRegister(regKey);
EXTENSIONS --
The Extensions tab allows you to list the extensions that are supported by the database to which you are currently logged in. Use the Add and Delete buttons to modify the list.
IMPORT/ EXPORT --
This tab helps the
administrator to export the configuration/ Compatible Units to a XML for future
use or as a backup.
While you try to
import similar XML, one will encounter the similar UI asking to replace or to
append the already available configuration. When you say append it really
appends the data if there is any change from the earlier available
configuration.
While to try to
export,the following UI should be encountered asking what has to be exported
and where.
The same Import and Export is possible in command line,
refer http://resources.arcfmsolution.com/DesktopConfig/webframe.html
CONFIGURATION --
The basic
configuration includes the prefix of the session SN_, default version,
Px_Command Timeout, checking out ESRI license etc.
Conclusion: Yes, a deep
look on the configuration and customization of PFA@ is been discussed here. By this article one cannot
be successful either in configuration or customization, practice and further
deep understanding of this tool makes any implementation perfect. Suggesting
the readers of this article to get into PFA@ tool with lots of trail configurations to realize
the actual relationship of the tabs in this PFA@ tool. Also, this article is not concluding the
complete workflow of SM* or WFM*, we are yet to conclude with Geodatabase
Manger (GDB Manager). In next post will discuss about configuring and
customizing GDB manager too.
Please make note you can always refer to Telvent web
pages for much better understanding of the same tool. Contents in this article
cannot be taken as a complete configuration and customization guide, the
information you came across are purely my experience but am sure this will get
anyone a good start.
For more details
information in this configuration please refer to http://resources.arcfmsolution.com/DesktopConfig/webframe.html
References:
* - My own short
forms
@ - Process
Framework Administration Tool
# - Use Name
should not have spaces in between and any special character.
Happy Coding
Rajesh K