Suppose an activity has two objectives (primary and one secondary objective). In this case, which objective does cmi.objectives.0.xxx refer to? primary or secondary?
Secondary objective. Consider the following example:
<imsss:objectives>
<imsss:primaryObjective objectiveID="primary_1" />
<imsss:objective objectiveID="obj_1" />
<imsss:objective objectiveID="obj_2" />
<imsss:objective objectiveID="obj_3" />
</imsss:objectives>
All objectives that have the tag <imsss:objecive> can be accessed by using "cmi.objecives.n.XX".
In this example we have only three objectives which can be accessed using "cmi.objectives.n.xx".
However, the primary objecive will not be directly accessed by the SCO. If you want to access the success status of the primary objective for example, you have to use "cmi.success_status". Think of the primary objective as the SCO itself. For instance, "objective satisfied status" refers to the primary objective.
Related
I'm configuring Work Execution. The Work Order History query that is called when retrieving past work orders for assets or locations is open-ended. Consequently, several thousand rows are retrieved each time and the application times out. I can attach where clause (see below) to limit it to records with actfinish after a specific date. However, what I want to do is something like this...
spi_wm:actfinish>now()-30
<!--WorkOrder History Asset Resource-->
<resource id="workOrderHistoryAssetLoc" class="application.business.WorkOrderObject" defaultOrderBy="wonum asc" describedBy="http://jazz.net/ns/ism/work/smarter_physical_infrastructure#WorkOrder" name="workOrderHistoryAssetLoc" pageSize="50" providedBy="/oslc/sp/WorkManagement">
<attributes id="workOrderHistoryAsset_attributes1">
<attribute describedByProperty="dcterms:identifier" id="workOrderHistoryAsset_identifier_dctermsidentifier1" index="true" name="identifier"/>
<attribute describedByProperty="oslc:shortTitle" id="workOrderHistoryAsset_wonum_oslcshortTitle1" index="true" name="wonum"/>
<attribute describedByProperty="dcterms:title" id="workOrderHistoryAsset_description_dctermstitle1" index="true" method="descriptionChanged" name="description"/>
<attribute describedByProperty="spi:status" id="workOrderHistoryAsset_status_spistatus" index="true" method="statusChanged" name="status"/>
<localAttribute dataType="string" id="workOrderHistoryAsset_statusdesc_string" name="statusdesc"/>
</attributes>
<queryBases id="workOrderHistoryAsset_queryBasesh">
<queryBase defaultForSearch="true" id="workOrderHistoryAsset_queryBase_searchAllWorkOrdersh" name="searchAllWorkOrdersAsset" queryUri="/oslc/os/oslcwodetail?savedQuery=getWithComplexQuery"/>
<!-- TODO AWH 20170130 - add where clause to this query -->
</queryBases>
<whereClause clause="spi:status in ['COMP','CLOSE'] and spi_wm:actfinish>'2016-10-10T09:50:00-04:00'" id="workOrderHistoryAssetLoc_whereClause"/>
</resource>
I see elsewhere where there are formulas in the app.xml but I don't know what types of operators or language is available to accomplish something like this. I was hoping the whereClause attribute had the ability to use a resolverClass and resolverFunction so that I could replace a named parameter with a value derived from a javascript function... no dice. Any help would be appreciated!
It looks like you are attempting to set the where clause in the app.xml. While I think this could work, it would probably be a million times easier to do the following.
duplicate the resource, then comment out the original
Create a saved query in Maximo with the where clause you need
a. spi:status in ['COMP','CLOSE'] and spi_wm:actfinish>'2016-10-10T09:50:00-04:00'
Name the saved query "ANYWHERE_WOHIST" or something like that.
Modify the duplicate resource to point to your new saved query.
<queryBase defaultForSearch="true" id="workOrderHistoryAsset_queryBase_searchAllWorkOrdersh" name="searchAllWorkOrdersAsset" queryUri="/oslc/os/oslcwodetail?savedQuery=ANYWHERE_WOHIST"/>
Also, this allows the query where clause to be managed in the backend, so when your users decide they want to see something else here you can mange the query within Maximo. We're nearing the end of our project with Anywhere, so feel free to reach out if you'd like to swap war stories.
I have some data I want to fill in when my form opens, so I created an XML-file-based secondary data connection (it has to be a secondary connection, not the primary) with some sample values with the intent of later removing them and replacing them with real values. It basically looks like this:
<root>
<entry>
fields here
</entry>
<entry>
fields here
</entry>
</root>
(The second entry is so that InfoPath knows it has repeating values.)
I then bound <entry> to a repeating table in my form.
But when I open the form, there are exactly two values, and the options to allow adding/removing entries are greyed out. InfoPath knows that this is a repeating element, otherwise I wouldn't be able to bind it to a repeating table.
How can I change this to allow adding and removing entries?
Apparently, secondary data sources cannot be modified. I found this information in the InfoPath help.
Modifying secondary data sources
Because the fields and groups in secondary data sources are based on data connections to external data sources, you cannot modify the fields and groups in a secondary data source. When you view a secondary data source in the Data Source task pane, the fields have the locked field icon and the groups have the locked group icon to indicate that you cannot modify them.
I have a Workflow SQL databroker in which the ID field is a sequential number with additional character padding, i.e. P001 or TM234.
I have defined the query for ID generation as:
<key-generation field="id" query="queries/asset-patent-get-id" />
which simply retrieves next sequence value based on provided parameters. So for every created record I need to make sure that by the time ID gets stored in database it was already padded as per required rules and stored as a string rather than just a number.
First thing to note: a data rule isn't bound to an operation, but instead to a field. So in this case, just think of the key-generation operation as retrieving the next number in a sequence, nothing more. Once the sequence value is retrieved, an appropriate bound data rule should be able to format the sequence value before it is persisted.
You should be able to define a data rule something like this:
<!-- datarules/format-asset-patent-id/definition.xml -->
<data-rule name="format-asset-patent-id"
factory-class="com.aviarc.framework.datarule.xml.DefaultXMLDataRuleProviderFactoryImpl"
datarule-class="com.aviarc.framework.datarule.workflow.WorkflowDataRule">
<parameters>
<parameter name="field" mandatory="y"/>
</parameters>
<event name="onBeforeDatasetPersisted" workflow="workflows/format-asset-patent-id" field="{#field}"/>
</data-rule>
Then in the format-asset-patent-id workflow you can take care of formatting the id. (Note: I haven't had the chance to test whether the onBeforeDatasetPersisted event fires before or after the key-generation operation is performed.)
Then you could bind it with a data binding, for example:
<!-- databindings/asset-patent.xml -->
<databinding databroker="asset-patent"
factory-class="com.aviarc.framework.databinding.basic.BasicDataBindingFactoryImpl">
<on-dataset-bound>
<data-rules>
<format-asset-patent-id field="id"/>
</data-rules>
</on-dataset-bound>
</databinding>
Afternoon all,
I'm learning BizTalk and am stuck on this problem.
There's a choice group with either telephone or address.
I can get the some of the address fields to be suppressed when outputting the telephone.
To make things simpler I'll just discuss the "CityName" field .
I've tried the following:
Mapped the "City" (text) node in the input file to "CityName" in the output. Connected an Exists logical functoid to the "Address1" node in the input node and the "CityName" in the output. I always get a city name with text filled in.
Mapped the "City" node in the input file and the Exists logical functoid to a Value Mapper functoid. Connected the Value Mapper functoid to the CityName in the output. I get a city name in the address node (Correct) and an empty node in the telephone node (Incorrect).
Mapped the "City" node in the input file and the Exists logical functoid to a Value Mapper (Flattening) functoid. Connected the Value Mapper (Flattening) functoid to the CityName in the output. I get a city name in the address node (Correct) and an empty node in the telephone node (Incorrect).
I thought one of the last two should have worked but both give an empty node instead of a suppressed node. The empty nodes have no attributes.
The CityName node is described by this schema type:
<xsd:complexType name="NameType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="languageID" type="xsd:language" use="optional">
</xsd:attribute>
<xsd:attribute name="sequence" type="IntegerNumericType">
</xsd:attribute>
<xsd:attribute name="sequenceName" type="StringType" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="IntegerNumericType">
<xsd:restriction base="xsd:integer" />
</xsd:simpleType>
<xsd:simpleType name="StringType">
<xsd:restriction base="xsd:string" />
</xsd:simpleType>
Is there something in the type definition that's forcing an empty node to be created?
Thanks
EDIT: Below is the incorrect output. The second and third Communication nodes have
an Address Child node and should not.
I have a looping functoid on the phone numbers and the first address line in a flat input schema. That produces the three Communications nodes. I'm using a Logical Existance functoid on the address line to suppress the phone info in the first node. I have a Logical Not functoid on the output of that which is tied directly to the Address node in the output schema. I thought that should turn off the entire address node but it doesn't.
I tried adding a Value Mapping functoid connected to the Logical Existance functoid to the City Name and Postal code elements and that makes them empty, but they just will not go away. ARG!
I checked and the fields are all set to zero MinOccurs and I don't believe they're assigned a default value.
<ns0:Communication>
<ns0:Address>
<ns0:AddressLine sequence="1">1234 My St</ns0:AddressLine>
<ns0:AddressLine sequence="2">Apt. 2</ns0:AddressLine>
<ns0:CityName>Kansas City</ns0:CityName>
<ns0:CountrySubDivisionCode name="State">MO</ns0:CountrySubDivisionCode>
<ns0:CountrySubDivisionCode name="County">Jackson</ns0:CountrySubDivisionCode>
<ns0:CountryCode>US</ns0:CountryCode>
<ns0:PostalCode>64099</ns0:PostalCode>
</ns0:Address>
</ns0:Communication>
<ns0:Communication sequence="1">
<ns0:ChannelCode>Telephone</ns0:ChannelCode>
<ns0:UseCode>Personal</ns0:UseCode>
<ns0:DialNumber>1234567890</ns0:DialNumber>
<ns0:Address>
<ns0:CityName />
<ns0:CountryCode />
<ns0:PostalCode>64099</ns0:PostalCode>
</ns0:Address>
</ns0:Communication>
<ns0:Communication sequence="2">
<ns0:ChannelCode>Telephone</ns0:ChannelCode>
<ns0:UseCode>Business</ns0:UseCode>
<ns0:DialNumber>0987654321</ns0:DialNumber>
<ns0:Address>
<ns0:CityName />
<ns0:CountryCode />
<ns0:PostalCode>64099</ns0:PostalCode>
</ns0:Address>
</ns0:Communication>
It would help to have sample input and output xml snippets. Without that, I can guess at the xml structures. If they look something like this, then the below mapping should work fine:
Do your schemas look like that? The output produced by such a map is valid IF the <Choice> in the destination schema is set to Max Occurs = unbounded. If that's not the case, and if you can only have one Contact output, then you would have to only output the Phone if the Address is not there, like this:
Of course, that seems a bit silly, since one would expect to have both an Address and a Phone in the source xml, and the destination xml prevents you from having both.
If none of these scenarios matches up with yours, then please edit your question to provide more details.
The min & max occurrences on the schema defaults to 1. The mapper looks at that when generating the XSLT. Try setting Min Occur to 0.
The way to solve this issue is to use xsl directly instead of the built in mapper.
With xsl you can control when and how values are selected. That's very difficult
when using multiple looping functoids.
Is there a way, in Axapta/Dynamics Ax, to create an Extended Data Type of type integer which only allows enering values in a specified range (i.e., if the extended data type is meant for storing years, I should be able to set a range like 1900-2100), or do I have to manage the range using X++ code?
And if I need to use X++ code to manage the range, which is the best way to do it?
I suggest you use the ''validateField'' of the corresponding table.
Search for the method in AOT\Data Dictionay\Tables to see many examples.
You can can't specify the range on the extended data type itself. If the type is used for a table field, you can add code to the insert and update methods of the table, in order to validate the value whenever the record is updated. This approach could however have a cost in terms of performance.
You can also choose to just add code the the validateWrite method of the table, if you are satisfied with the validation only taking place when the value is modified from the UI.