Scheduled Deski prompts always fails on DMA0007

Hello once again,

After several weeks of other activities, I have picked up my work on BO again. I’m using the webservice SDK, XI version 3.1 as far as I can tell.
My previous issues revolved around setting prompts and (frustratingly enough) that hasn’t really changed.

Using the code provided by darcstorm in this topic I am now able to (finally!) set prompts for Webi reports.
I presumed this to work similarly for Deski, but so far I have no luck with that. Every scheduled report results in a failure saying “The following data providers have not been successfully refreshed: Query 1 with VOCUS_XIII_POISONIVY_OCI. (DMA0007)”.
Looking around through dozens of posts on these and other forums I cannot find any solution, but I was hoping that someone would have an idea.

My question is quite simple: does anyone have an idea on how to fix this? Is the code (provided below) ‘just wrong’? Or must I look for a solution in other places?

Below I pasted some examples of the output I get at different places for Webi and Deski, along with the different objects used between Webi and Deski. the code I use for Deski. I realize it’s quite a bit of data, but hey I wanted to be thorough here ;). Furthermore:

  • The Webi report uses a single text value prompt whereas the Deski report uses a single id value prompt.
  • In the example code (linked topic) there’s a line using “promptInfo.getDataProviderIDsArray()”. This works for Webi, but I’ve noticed that this is empty in the case of the Deski report.
    Does this play any (meaningful) role? It doesn’t seem like it does, hence I removed it from the code below.

----------------------------------------
Code difference between Webi and Deski

Webi	vs	Deski
-------------------------------------------------
DataProviders		   PromptDataProviders
DataProvider		    PromptDataProvider
WebiProcessingInfo    FullClientProcessingInfo
WebiPrompts		     FullClientPrompts
WebiPrompt		      FullClientPrompt
Values (Webi)		   Values (FullClient)
WebiFormatOptions	  FullClientFormatOptions
WebiFormatEnum		  FullClientFormatEnum

Webi

  • PromptInfo[]: note the Value
[<xml-fragment ID="ROOT.0" Name="001 Instelling" ns1153:LocalizedQuestion="001 Instelling" PromptType="TEXT" Constrained="false" RequireAnswers="true" HasLOV="true" AllowMultiValues="false" AllowDiscreteValue="true" AllowRangeValue="false" LovDisplayType="STANDARD" AllowNonLeafValues="false" ns1153:Optional="false" ns1153:LovDelegated="false" xmlns:ns1153="http://reportengine.dsws.businessobjects.com/2007/06/01">
  <Description xmlns="http://reportengine.dsws.businessobjects.com/2005"/>
  <PreviousValues RowIndex="()" xsi:type="ns:DiscretePromptValue" xmlns="http://reportengine.dsws.businessobjects.com/2005" xmlns:ns="http://reportengine.dsws.businessobjects.com/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Value>Etty Hillesum Lyceum</Value>
    <NativeValue xsi:type="xs:string" xmlns="http://reportengine.dsws.businessobjects.com/2007/06/01" xmlns:xs="http://www.w3.org/2001/XMLSchema">Etty Hillesum Lyceum</NativeValue>
  </PreviousValues>
  <MinValue xsi:nil="true" xmlns="http://reportengine.dsws.businessobjects.com/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
  <MaxValue xsi:nil="true" xmlns="http://reportengine.dsws.businessobjects.com/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
  <LOV xsi:nil="true" xmlns="http://reportengine.dsws.businessobjects.com/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
  <DataProviderIDs xmlns="http://reportengine.dsws.businessobjects.com/2005">DP0</DataProviderIDs>
</xml-fragment>]
  • DataProviderInfo[]
[<xml-fragment ID="DP0" Name="Query 1" RefreshDate="2009-08-18T16:47:20.000+02:00" RefreshDuration="1" ns1153:Refreshable="true" xmlns:ns1153="http://reportengine.dsws.businessobjects.com/2007/06/01"/>]
  • WebiPrompts: note the entered Value
<wi:Prompt xmlns:io="http://enterprise.businessobjects.com/3.0/infoobject" xmlns="http://biplatform.dsws.businessobjects.com/2007/06/01" xmlns:wi="http://enterprise.businessobjects.com/3.0/webi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <wi:Name>001 Instelling</wi:Name>
  <wi:Values>
    <wi:Value>Etty Hillesum Lyceum</wi:Value>
  </wi:Values>
  <wi:DataProviders>
    <wi:DataProvider>
      <wi:Name>Query 1</wi:Name>
      <wi:ID>DP0</wi:ID>
    </wi:DataProvider>
  </wi:DataProviders>
</wi:Prompt>

Deski

  • PromptInfo[]: note the Value
[<xml-fragment ID="ROOT.0" Name="Geef instelling op:" ns1150:LocalizedQuestion="Geef instelling op:" PromptType="NUMERIC" Constrained="false" RequireAnswers="true" HasLOV="true" AllowMultiValues="false" AllowDiscreteValue="true" AllowRangeValue="false" LovDisplayType="STANDARD" AllowNonLeafValues="false" ns1150:Optional="false" ns1150:LovDelegated="false" xmlns:ns1150="http://reportengine.dsws.businessobjects.com/2007/06/01">
  <Description xmlns="http://reportengine.dsws.businessobjects.com/2005"/>
  <PreviousValues RowIndex="" xsi:type="ns:DiscretePromptValue" xmlns="http://reportengine.dsws.businessobjects.com/2005" xmlns:ns="http://reportengine.dsws.businessobjects.com/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Value>22998</Value>
    <NativeValue xsi:type="xs:double" xmlns="http://reportengine.dsws.businessobjects.com/2007/06/01" xmlns:xs="http://www.w3.org/2001/XMLSchema">22998.0</NativeValue>
  </PreviousValues>
  <MinValue xsi:nil="true" xmlns="http://reportengine.dsws.businessobjects.com/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
  <MaxValue xsi:nil="true" xmlns="http://reportengine.dsws.businessobjects.com/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
  <LOV xsi:nil="true" xmlns="http://reportengine.dsws.businessobjects.com/2005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</xml-fragment>]
  • DataProviderInfo[]
[<xml-fragment ID="0" Name="Query 1 with VOCUS_XIII_POISONIVY_OCI" RefreshDate="2009-08-19T11:39:45.000+02:00" RefreshDuration="0" ns1151:Refreshable="false" xmlns:ns1151="http://reportengine.dsws.businessobjects.com/2007/06/01"/>]
  • FullClientPrompt[]: note the entered Value
<fc:Prompt xmlns:io="http://enterprise.businessobjects.com/3.0/infoobject" xmlns="http://biplatform.dsws.businessobjects.com/2007/06/01" xmlns:fc="http://enterprise.businessobjects.com/3.0/fullclient" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <fc:Name>Geef instelling op:</fc:Name>
  <fc:Values>
    <fc:Value>22998</fc:Value>
  </fc:Values>
  <fc:DataProviders>
    <fc:DataProvider>
      <fc:ID>0</fc:ID>
      <fc:Name>Query 1 with VOCUS_XIII_POISONIVY_OCI</fc:Name>
    </fc:DataProvider>
  </fc:DataProviders>
</fc:Prompt>

Modified Deski Code
Nevermind the ‘unknown’ function calls and BI~ objects.

		FullClient fullClient = (FullClient) node;

		String docReference = node.getCUID();
		DocumentInformation documentInformation;

		// Retrieving prompts
		RetrieveMustFillInfo mustFillInfo = RetrieveMustFillInfo.Factory.newInstance();
		RetrievePromptsInfo retrievedPrompts = RetrievePromptsInfo.Factory.newInstance();
		mustFillInfo.setRetrievePromptsInfo(retrievedPrompts);

		RetrieveData retrieveData = RetrieveData.Factory.newInstance();
		retrieveData.setRetrieveDataProvidersInfo(RetrieveDataProvidersInfo.Factory.newInstance());
		retrieveData.setRetrieveView(RetrieveView.Factory.newInstance());

		documentInformation =
			queryDocumentInformation(docReference, mustFillInfo, null, retrieveData, biEngine);
		PromptInfo[] promptsInfo = documentInformation.getPromptInfoArray();
		int promptInfoCount = promptsInfo.length;

		// Build the necessary dataproviders (required for the prompts later on).
		DataProviderInfo[] dataProvidersInfo = documentInformation.getDataProviderInfoArray();
		int dpiCount = (dataProvidersInfo != null) ? dataProvidersInfo.length : 0;
		if (dpiCount == 0)
			throw new Exception("There should be at least 1 data provider for this document.");

		int dataProviderInfoCount = dataProvidersInfo.length;
		PromptDataProvider[] newDataProviders = new PromptDataProvider[dataProviderInfoCount];
		for (int i = 0; i < dataProviderInfoCount; i++)
		{
			DataProviderInfo dataProviderInfo = dataProvidersInfo[i];

			PromptDataProvider dataProvider = PromptDataProvider.Factory.newInstance();
			dataProvider.setID(dataProviderInfo.getID());
			dataProvider.setName(dataProviderInfo.getName());

			newDataProviders[i] = dataProvider;
		}

		// Retrieve/Create the processingInfo &amp; prompts.
		FullClientProcessingInfo processingInfo = fullClient.getFullClientProcessingInfo();
		if (processingInfo == null)
			processingInfo = fullClient.addNewFullClientProcessingInfo();
		FullClientPrompts promptsHolder = processingInfo.getPrompts();
		if (promptsHolder == null)
			promptsHolder = processingInfo.addNewPrompts();

		FullClientPrompt[] prompts = new FullClientPrompt[promptInfoCount];
		for (int current = 0; current < promptInfoCount; current++)
		{
			// Which prompt are we currently looking at?
			PromptInfo promptInfo = promptsInfo[current];

			// Create the prompt to be part of the scheduled InfoObject
			FullClientPrompt prompt = FullClientPrompt.Factory.newInstance();
			prompt.setName(promptInfo.getName());
			prompt.setValues(Values.Factory.newInstance());
			prompt.getValues().setValueArray(new String[] {"22998"});

			// Set the updated data providers to the prompt
			PromptDataProviders dps = PromptDataProviders.Factory.newInstance();
			dps.setDataProviderArray(newDataProviders);

			prompt.setDataProviders(dps);
			prompts[current] = prompt;
		}
		promptsHolder.setPromptArray(prompts);

		// Set PDF formatting
		FullClientFormatOptions formatOptions = processingInfo.addNewFullClientFormatOptions();
		formatOptions.setFormat(FullClientFormatEnum.PDF);

		// Schedule the InfoObject for right now.
		SchedulingInfo schedulingInfo = fullClient.addNewSchedulingInfo();
		fullClient.setSchedulingInfo(getScheduledRightNow(schedulingInfo));

		InfoObjects schedulable = InfoObjects.Factory.newInstance();
		schedulable.setInfoObjectArray(new InfoObject[] {fullClient});// {webi});
// schedule after this

raznu :netherlands: (BOB member since 2009-06-23)