I have an InfoPath 2010 form that enables users to create vacation requests and store them in a SharePoint 2010 form library.
When a user submits the form, the value of the Vacation Status column in the library is set to Pending, triggering a workflow that sends an email to the user's manager.
The manager clicks a link in the email, which opens the form in a browser, and clicks Approve. This changes the value of the Vacation Status column to Approved, triggering a workflow that sends an email back to the user to say the request has been approved.
The problem is, something has gone wrong with the form. When the manager clicks Approve, it should trigger an InfoPath form rule that sets the value of the Vacation Status column to Approved, but the column is not being updated. The Modified column is not updated either, which sugggests nothing is being uploaded to SharePoint when the Approve button is clicked.
The InfoPath form has a rule that runs when the Approve button is clicked, and its action is to set the value of the VacationStatus field to Approved; this field is then promoted to the SharePoint library on submission.
No error is generated in the Event Viewer. I have enabled ULS logging and have attached an extract below. I hope this is enough - I didn't want to clog up the post with too much detail.
Calling GlobalStorage.SetItem with index IsConversionInProgress value type Boolean.
XmlFormView: Entering OnInit
GlobalStorage.Leave: Old context - FormControl Total contexts after Leave - 0
XmlFormView: Leaving OnInit
FormServerPage OnInit Enter: http://intranet/_layouts/FormServer.aspx?XmlLocation=/apps/Vacation/INTRANET_FHenry - 20130227003027.xml&ClientInstalled=true&Source=http://intranet/apps/Vacation/Forms/Temporary%2520view.aspx&DefaultItemOpen=1
GlobalStorage.Enter: New context - {F888E1A1-20CA-470d-A2F4-498A9ECD1C67} Total contexts - 1
GlobalStorage.Leave: Old context - {F888E1A1-20CA-470d-A2F4-498A9ECD1C67} Total contexts after Leave - 0
Calling GlobalStorage.SetItem with index IsConversionInProgress value type Boolean.
Calling GlobalStorage.SetItem with index SiteAndWebCache value type SiteAndWebCache.
XmlFormView: Entering OnDataBinding
GlobalStorage.Enter: New context - FormControl Total contexts - 1
Calling GlobalStorage.SetItem with index BusinessLogicAssemblies value type Dictionary`2.
Calling GlobalStorage.SetItem with index EditingSessionId value type String.
Creating document with editingSessionId: 1cff78abc351429e8df5c5733d481407_90175d3f7fa04d9384760909b98c30a6
Calling GlobalStorage.SetItem with index TimeZoneId value type UInt16.
DataObject.Deserialize.Load for XML name: finished in:00:00:00.0005151.
Calling GlobalStorage.SetItem with index CultureData value type RequestCultureData.
Calling GlobalStorage.SetItem with index FormState value type FormStateBag.
Calling GlobalStorage.SetItem with index XmlForm value type XmlFormHost.
XmlForm.PlayEventLog: http://intranet/_layouts/FormServer.aspx?XmlLocation=/apps/Vacation/INTRANET_FHenry - 20130227003027.xml&ClientInstalled=true&Source=http://intranet/apps/Vacation/Forms/Temporary%2520view.aspx&DefaultItemOpen=1 finished in:00:00:00.0003444.
GlobalStorage.Leave: Old context - FormControl Total contexts after Leave - 0
XmlFormView: Leaving OnDataBinding
FormServerPage OnInit Leave: http://intranet/_layouts/FormServer.aspx?XmlLocation=/apps/Vacation/INTRANET_FHenry - 20130227003027.xml&ClientInstalled=true&Source=http://intranet/apps/Vacation/Forms/Temporary%2520view.aspx&DefaultItemOpen=1
FormServerPage CreateChildControls Enter: http://intranet/_layouts/FormServer.aspx?XmlLocation=/apps/Vacation/INTRANET_FHenry - 20130227003027.xml&ClientInstalled=true&Source=http://intranet/apps/Vacation/Forms/Temporary%2520view.aspx&DefaultItemOpen=1
FormServerPage CreateChildControls Leave: http://intranet/_layouts/FormServer.aspx?XmlLocation=/apps/Vacation/INTRANET_FHenry - 20130227003027.xml&ClientInstalled=true&Source=http://intranet/apps/Vacation/Forms/Temporary%2520view.aspx&DefaultItemOpen=1
GlobalStorage.Enter: New context - FormControl Total contexts - 1
XmlFormView: Entering Render
Calling GlobalStorage.SetItem with index GlobalPageObjectsRendered value type Boolean.
DataObject.Serialize.Save for XML name: finished in:00:00:00.0009733.
Disposing all cached sites.
XmlFormView: Leaving Render
GlobalStorage.Leave: Old context - FormControl Total contexts after Leave - 0
GlobalStorage.Enter: New context - FormControl Total contexts - 1
GlobalStorage.Leave: Old context - FormControl Total contexts after Leave - 0
GlobalStorage.Enter: New context - FormControl Total contexts - 1
Calling GlobalStorage.RemoveAllDecumentOnly!
GlobalStorage.Leave: Old context - FormControl Total contexts after Leave - 0
GlobalStorage.Enter: New context - FormControl Total contexts - 1
Calling GlobalStorage.RemoveAll!
GlobalStorage.Leave: Old context - FormControl Total contexts after Leave - 0
FormServerPage EndProcessRequest: http://intranet/_layouts/FormServer.aspx?XmlLocation=/apps/Vacation/INTRANET_FHenry - 20130227003027.xml&ClientInstalled=true&Source=http://intranet/apps/Vacation/Forms/Temporary%2520view.aspx&DefaultItemOpen=1
Request: Posting back to the Postback Page (XmlHttp).
Calling GlobalStorage.SetItem with index GlobalPageObjectsRendered value type Boolean.
GlobalStorage.Enter: New context - FormControl Total contexts - 1
Calling GlobalStorage.SetItem with index IsConversionInProgress value type Boolean.
Calling GlobalStorage.SetItem with index SiteAndWebCache value type SiteAndWebCache.
Calling GlobalStorage.SetItem with index CultureData value type RequestCultureData.
Calling GlobalStorage.SetItem with index TimeZoneId value type UInt16.
Calling GlobalStorage.SetItem with index BusinessLogicAssemblies value type Dictionary`2.
Calling GlobalStorage.SetItem with index EditingSessionId value type String.
Creating document with editingSessionId: 1cff78abc351429e8df5c5733d481407_90175d3f7fa04d9384760909b98c30a6
DataObject.Deserialize.Load for XML name: finished in:00:00:00.0005092.
Calling GlobalStorage.SetItem with index FormState value type FormStateBag.
Calling GlobalStorage.SetItem with index XmlForm value type XmlFormHost.
PostbackPage.PlayEventLog:http://intranet/_layouts/Postback.FormServer.aspx finished in:00:00:00.0002112.
Abandoning state for request. Form Template: urn:schemas-microsoft-com:office:infopath:Vacation-Form:-myXSD-2012-06-28T00-57-45
Not persisting state for request due to previous errors. Form Template: urn:schemas-microsoft-com:office:infopath:Vacation-Form:-myXSD-2012-06-28T00-57-45
Disposing all cached sites.
Calling GlobalStorage.RemoveAll!
GlobalStorage.Leave: Old context - FormControl Total contexts after Leave - 0
I hope I have explained this clearly. I am by no means an InfoPath expert. This is code that was developed by a contractor who is no longer available. It had been working fine for quite a while and then it stopped. I am not aware of any configuration changes, permissions, etc. that might have affected it. However, I have redeployed the form a few times. This has not fixed the problem but neither has it broken anything because the initial submission of the form data to SharePoint works.
Please check your data connections. The one used by the Approve rule (and fails) is probably different from the main submit data connection.
Related
Hi I'm trying to add a labor transaction from an action automation script with the object being ASSIGNMENT in Maximo. I am currently trying the code below.
labTransSet = MXServer.getMXServer().getMboSet("LABTRANS",ui);
labTrans = labTransSet.add();
labTrans.setValue("laborcode", userLabor);
labTrans.setValue("wonum", assignWonum);
sds1=SimpleDateFormat("hh.mm aa").format(firstDate);
sds2=SimpleDateFormat("hh.mm aa").format(Date());
labTrans.setValue("STARTTIME", sds1);
labTrans.setValue("FINISHTIME", sds2);
labTransSet.save();
labTransSet.close();
userLabor is the username of the current user
assignWonum is the assignment work order number
firstDate is the scheduled date field from the assignment
The labor record is being added correctly with the right data, but when I go to route my workflow after the script is called from a button, I am given the warning BMXAA8229W WOACTIVITY has been updated by another user and the work order does not route. I am under the impression that this is happening because the assignment object for the script is being queried at the same time I try to add and save a labor record. Does anyone know if my guess is correct or what else the problem is and how I can fix this? Thanks
That error occurs because Maximo already has one version of the record loaded into memory when the record in the database is modified independently. Maximo then tries to work with the in-memory object and sees it doesn't match what is in the database and throws that error. Timing doesn't really have anything to do with it (other than that an edit happened at some point after the record was loaded into memory).
What you need to do is make sure you are modifying the exact same task/assignment/labtrans record that has already been loaded into memory. That "MXServer.getMXServer().getMboSet" stuff is guaranteed to use a new object. That is how you start a new transaction in Maximo; how you make sure you are not using anything already loaded into memory. I suspect you want to get your set off of the implicit "mbo" object the script will give to you.
I need to know the list of Visual Basic 6 error codes returned by ADODB SQL Server connection. I also want to know the Err.Nativeerror for each SQL ADODB error code.
Any information about where we can get these errors codes or any VB6 codes which list the exceptions and error codes with descriptions of the error details and what the errors mean.
A table of the ADODB error codes with brief descriptions are located at ADO Programmer's Reference > ADO API Reference > ADO Enumerated Constants.
There is a note:
OLE DB errors may be passed to your ADO application. Typically, these
can be identified by a Windows facility code of 4. For example,
0x8004.
Also to determine if an HRESULT error code is an ADODB error, this additional note indicates:
Hexadecimal—The hexadecimal representation of the full error number.
The Windows facility code is in the fourth digit. The facility code
for ADO error numbers is A. For example: 0x800A0E7B.
See also [MS-ERREF]: Windows Error Codes from Microsoft which has a link to a pdf of a document from Microsoft with a fairly comprehensive list of codes and their descriptions. There is an RSS feed to subscribe for notifications of updates.
See as well as very comprehensive list of Error Codes list for Microsoft technologies from Symantech.
See this Wikipedia topic HRESULT describing the error code format used by Microsoft for HRESULT error codes. From the topic the format as to how bits are used is:
S - Severity - indicates success/fail
0 - Success
1 - Failure
R - Reserved portion of the facility code, corresponds to NT's second severity bit.
1 - Severe Failure
C - Customer. This bit specifies if the value is customer-defined or Microsoft-defined.
0 - Microsoft-defined
1 - Customer-defined
N - Reserved portion of the facility code. Used to indicate a mapped NT status value.
X - Reserved portion of the facility code. Reserved for internal use. Used to indicate HRESULT values that are not status values, but are instead message ids for display strings.
Facility - indicates the system service that is responsible for the error. Example facility codes are shown below (for the full list see [1]).
1 - RPC
2 - Dispatch (COM dispatch)
3 - Storage (OLE storage)
4 - ITF (COM/OLE Interface management)
7 - Win32 (raw Win32 error codes)
8 - Windows
9 - SSPI
10 - Control
11 - CERT (Client or server certificate)
...
Code - is the facility's status code
The ITF facility code has subsequently been recycled as the range in which COM components can define their own component-specific error code.
A few of the more common codes are:
adErrItemNotFound - -2146825023 or 0x800A0CC1 - Item cannot be found in the collection that corresponds to the requested name or ordinal.
adErrNoCurrentRecord - -2146825267 or 0x800A0BCD - Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
adErrObjectNotSet - -2146824868 or 0x800A0D5C - Object is no longer valid.
One programmer error that I have done myself which resulted in an HRESULT of 0x800A0CC1 when doing an Update() is that the I did not have my SAFEARRAY setup properly. See usage differences between _variant_t, COleVariant, CComVariant, and VARIANT and using SAFEARRAY variations.
I am using the function getgroup() to read all of the groups of a user in the active directory.
I'm not sure if I'm doing something wrong but it is very very slow. Each time it arrives at this point, it takes several seconds. I'm also accessing the rest of Active directory using the integrated function of "Accountmanagement" and it executes instantly.
Here's the code:
For y As Integer = 0 To AccountCount - 1
Dim UserGroupArray As PrincipalSearchResult(Of Principal) = UserResult(y).GetGroups()
UserInfoGroup(y) = New String(UserGroupArray.Count - 1) {}
For i As Integer = 0 To UserGroupArray.Count - 1
UserInfoGroup(y)(i) = UserGroupArray(i).ToString()
Next
Next
Later on...:
AccountChecker_Listview.Groups.Add(New ListViewGroup(Items(y, 0), HorizontalAlignment.Left))
For i As Integer = 0 To UserInfoGroup(y).Count - 1
AccountChecker_Listview.Items.Add(UserInfoGroup(y)(i)).Group = AccountChecker_Listview.Groups(y)
Next
Item(,) contains my normal Active directory data that I display Item(y, 0) contain the username.
y is the number of user accounts in AD. I also have some other code for the other information in this loop but it's not the issue here.
Anyone know how to make this goes faster or if there is another solution?
I'd recommend trying to find out where the time is spent. One option is to use a profiler, either the one built into Visual Studio or a third-party profiler like Redgate's Ants Profiler or the Yourkit .Net Profiler.
Another is to trace the time taken using the System.Diagnostics.Stopwatch class and use the results to guide your optimization efforts. For example time the function that retrieves data from Active Directory and separately time the function that populates the view to narrow down where the bottleneck is.
If the bottleneck is in the Active Directory lookup you may want to consider running the operation asynchronously so that the window is not blocked and populates as new data is retrieved. If it's in the listview you may want to consider for example inserting the data in a batch operation.
I've copied Vu's Script, (and of course renamed it) which have access to another DB, and when I run it I have in the output the old transaction name of the old script.
here is the old transaction name which are to seen in the output : MDM_GetAssociations
Here is the renamed transaction:MDM_GET_ASSOCIATIONS_Otmann
After renaming the transaction, I run the script, I got 2 errors:
1)
Error 14 undeclared identifier `MDM_GET_ASSOCIATIONS_Otmann' Action.c C:\GCDM_Test\Scripts\MDM\MDM_Get_POSTGRE_Otmann MDM_Get_POSTGRE_Otmann
2)
Error 15 type error in argument 1 to web_custom_request'; foundint' expected `pointer to const char' Action.c C:\GCDM_Test\Scripts\MDM\MDM_Get_POSTGRE_Otmann MDM_Get_POSTGRE_Otmann
and this is my script :
//########## start the test scenario ############
web_set_max_html_param_len("8000");
web_set_sockets_option("SSL_VERSION", "TLS");
web_add_auto_header("Content-Type","application/xml");
web_add_auto_header("Accept","application/json");
web_add_auto_header("Authorization",lr_eval_string("{AUTHORIZATION}"));
//GetAssociations, NOTE: our dummy customers have often NO associations!
web_reg_save_param("RESPONSE", "LB=", "RB=", "Search=Body", LAST);
lr_start_transaction((char*)MDM_GENERIC_TRANSACTION);
lr_start_transaction((char*)MDM_GET_ASSOCIATIONS);
web_custom_request(MDM_GET_ASSOCIATIONS,
"URL={TEST_ENV_HOSTNAME}/api/v3/clients/{BUSINESS_CONTEXT}/customers/{GCID}/associations",
"Method=GET",
"Resource=1", // => We are retrieving a ressource,
// which implies that it is not critical for the success of the script.
// Any failures (HTTP 404 - Not found etc.) in downloading the resource
// will be considered as warnings rather than errors.
"EncType=application/xml",
"Referer=Loadrunner",
LAST);
lr_end_transaction((char*)MDM_GET_ASSOCIATIONS, LR_AUTO);
lr_end_transaction((char*)MDM_GENERIC_TRANSACTION, LR_AUTO);
return 0;
}
and this is the output where the old transaction name apeared (MDM_GetAssociations), but I don't know where is she coded or from where she came, and as I said before when I try to change it in all position which has to do with Transactions,I got the errors mentioned above.
Here ist the output of the script, where you can see the name of the old the transaction(MDM_GetAssociations).
Action.c(13): Notify: Transaction "MDM_GenericServiceCall_ALL" started.
Action.c(14): Notify: Transaction "MDM_GetAssociations" started.
Action.c(15): web_custom_request("MDM_GetAssociations") started
Action.c(15): web_custom_request("MDM_GetAssociations") highest severity level was "warning", 505 body bytes, 1971 header bytes [MsgId: MMSG-26388]
Action.c(25): Notify: Transaction "MDM_GetAssociations" ended with "Pass" status (Duration: 1,8408 Wasted Time: 1,2668).
Action.c(26): Notify: Transaction "MDM_GenericServiceCall_ALL" ended with "Pass" status (Duration: 2,4066 Wasted Time: 1,2668).
Ending action Action.
Ending iteration 1.
You have two variables. You do not have their declarations here. You do not have their contents. And you appear to be casting them from another data type to a pointer to a character.
Does this pass with a literal, "My_Test_Transaction"? If so, then you are likely looking at oddities on how your variable is declared, populated and referenced.
I am trying to create a Dcoument Approval WorkFlow, with Custom Task Edit infopath forms
Flow is ,When A Document is added into the List , it is assingned to User A , who is Orignator's Manager.
When User A Approves the document , it Assigned to User B for Approval.User B is fixed.
When User B has approved the document , then User B himself will assign the document to User C(Which means User C is dynamic and will be there at runtime).
When User C Approves it , A Task should be created for User , and work Flow should continue till User C Completes his Task.
Is Any of the Users , rejects the Task, The Workflow Should Stop.
How I implmented it ;
I created one Sequence Activity , as follows :
-create Task
-whileTaskNotComplete (onTaskChanged)
Complete Task
then Placed this Activity under Replicator Activity.
I am not sure how to set Replicator initialized and Child initialzed values .
I know replicator needs to be run for 3 times, but the last iterations value is not fixed, it is provided at runtime under second iteration.and under onTaskChange event of Activity.
How can I pass this value to workflow or next iteration?
second thing when i am setting any value for Apporver under replicator initialized method , it is assigning all the Tasks to same Approver which is set under initialized method.
could you please help me , I referred the videos http://www.shillier.com/Videos/MultipleTasks.wmv, but it is for Parallel mode , I need in sequential mode.
Thanks in advance.
Azra
I would start splitting it up in a state machine:
1 Start
2 Create and Assign Task
3 Wait for approval
4 End
in the "Wait for approval" you check for your conditions and then set a global variable for the next approver in line (make sure it's persisted) and set the state to "Create and Assign Task". Until you are done with your list.
1->2->3->(->2)->4