ITK Function Reference

(V10000.1.0.60_20160308.00)
Modules | Functions
Configuration Management

Modules

 CFM Errors
 
 CFM Tokens
 

Functions

CFM_API int CFM_ask_how_configured_user_ref (tag_t how_configured, tag_t *user_ref)
 
CFM_API int CFM_create_intent (const char *name, const char *desc, tag_t *new_intent)
 
CFM_API int CFM_find (const char *name, tag_t *rule)
 
CFM_API int CFM_free_how_configured (tag_t how_configured)
 
CFM_API int CFM_get_revision_rules (int *count, tag_t **rules)
 
CFM_API int CFM_group_entry_add_entry (tag_t group_entry, tag_t entry_to_add)
 
CFM_API int CFM_group_entry_list_entries (tag_t group_entry, int *n_entries, tag_t **entries)
 
CFM_API int CFM_group_entry_remove_entry (tag_t group_entry, tag_t entry_in_group)
 
CFM_API int CFM_group_itemtype_entry_ask_itemtypes (tag_t entry, int *n_itemtypes, char ***itemtypes)
 
CFM_API int CFM_group_itemtype_entry_set_itemtypes (tag_t entry, int n_itemtypes, char **itemtypes)
 
CFM_API int CFM_how_configured_text (tag_t how_configured, char **text)
 
CFM_API int CFM_latest_entry_ask_type (tag_t entry, int *type)
 
CFM_API int CFM_latest_entry_set_type (tag_t entry, int type)
 
CFM_API int CFM_latest_of_latest (tag_t rule, int n_candidates, tag_t *candidates, tag_t *latest)
 
CFM_API int CFM_list (int *count, tag_t **rules)
 
CFM_API int CFM_rule_add_intent (tag_t rule, tag_t intent)
 
CFM_API int CFM_rule_ask_date (tag_t rule, date_t *date)
 
CFM_API int CFM_rule_ask_effective_date (tag_t rule, date_t *date)
 
CFM_API int CFM_rule_ask_end_item (tag_t rule, tag_t *end_item)
 
CFM_API int CFM_rule_ask_end_item_rev (tag_t rule, tag_t *end_item_rev)
 
CFM_API int CFM_rule_ask_modifier (tag_t rule, tag_t *modifier)
 
CFM_API int CFM_rule_ask_unit (tag_t rule, int *unit)
 
CFM_API int CFM_rule_delete_modifier (tag_t modifier)
 
CFM_API int CFM_rule_generate_end_modifier (tag_t rule, int n_items, tag_t *items, logical override_parent, tag_t *last_itemrev, tag_t *last_modifier)
 
CFM_API int CFM_rule_generate_modifier (tag_t rule, tag_t itemrev, logical override_parent, tag_t old_modifier, tag_t *new_modifier)
 
CFM_API int CFM_rule_generate_modifier_chain (tag_t rule, int n_items, tag_t *items, logical override_parent, tag_t **itemrevs, tag_t **modifiers)
 
CFM_API int CFM_rule_list_intents (tag_t rule, int *n_intents, tag_t **intents)
 
CFM_API int CFM_rule_remove_intent (tag_t rule, tag_t intent)
 
CFM_API int CFM_rule_set_date (tag_t rule, date_t date)
 
CFM_API int CFM_rule_set_effective_date (tag_t rule, date_t date)
 
CFM_API int CFM_rule_set_end_item (tag_t rule, tag_t end_item)
 
CFM_API int CFM_rule_set_end_item_rev (tag_t rule, tag_t end_item_rev)
 
CFM_API int CFM_rule_set_modifier (tag_t rule, tag_t modifier)
 
CFM_API int CFM_rule_set_unit (tag_t rule, int unit)
 
CFM_API int CFM_set_how_configured_user_ref (tag_t how_configured, tag_t user_ref)
 
CFM_API int CFM_unitno_entry_ask_no (tag_t entry, int *unit_no)
 
CFM_API int CFM_unitno_entry_set_no (tag_t entry, int unit_no)
 
CFM_API int CFM_updated (tag_t rule)
 

Entry Types for Revision Rules

#define CFM_entry_working   0
 
#define CFM_entry_status   1
 
#define CFM_entry_override   2
 
#define CFM_entry_date   3
 
#define CFM_entry_unit_no   4
 
#define CFM_entry_group   5
 
#define CFM_entry_precise   6
 
#define CFM_entry_latest   7
 
#define CFM_entry_end_item   8
 
#define CFM_entry_group_item_type   9
 
#define CFM_entry_branch   10
 
#define CFM_entry_nested_eff   11
 

Config Types for Status Entries

#define CFM_status_released_date   0
 
#define CFM_status_effective_date   1
 
#define CFM_status_unit_no   2
 

Config Types for Latest Entries

#define CFM_latest_creation_date   0
 
#define CFM_latest_alphanumeric   1
 
#define CFM_latest_numeric   2
 
#define CFM_latest_alpha_plus_no   3
 

CFM Rule

Common Return Values:

CFM_invalid_entry_type The type given is not one of the valid entry types.
CFM_entry_not_in_rule The given entry is not contained in the given rule.
CFM_cant_move_entry_in_groupAn entry that is in a group cannot be moved.
CFM_entry_already_in_group One or more of the entries is already in a group.
CFM_entry_is_not_groupable Only working and status entries may be grouped.
CFM_API int CFM_rule_create (const char *rule_name, const char *description, tag_t *new_rule)
 
CFM_API int CFM_rule_copy (tag_t rule_to_copy, const char *new_name, tag_t *new_rule)
 
CFM_API int CFM_ask_rule_text (tag_t rule, char **text)
 
CFM_API int CFM_rule_reevaluate (tag_t rule)
 
CFM_API int CFM_rule_add_entry (tag_t rule, int type, tag_t *entry)
 
CFM_API int CFM_rule_delete_entry (tag_t rule, tag_t entry)
 
CFM_API int CFM_rule_replace_entry (tag_t rule, tag_t old_entry, int type, tag_t *new_entry)
 
CFM_API int CFM_rule_list_entries (tag_t rule, int *n_entries, tag_t **entries, int **entry_types)
 
CFM_API int CFM_rule_move_entry_up (tag_t rule, tag_t entry)
 
CFM_API int CFM_rule_move_entry_down (tag_t rule, tag_t entry)
 
CFM_API int CFM_rule_group_entries (tag_t rule, int n_entries, tag_t *entries, tag_t *group_entry)
 
CFM_API int CFM_rule_group_entries_by_itemtype (tag_t rule, int n_entries, tag_t *entries, int n_itemtypes, char **item_types, tag_t *group_entry)
 

CFM Entry

CFM_API int CFM_entry_ask_type (tag_t entry, int *type)
 
CFM_API int CFM_working_entry_ask_user (tag_t entry, logical *current_user, tag_t *user)
 
CFM_API int CFM_working_entry_set_user (tag_t entry, logical current_user, tag_t user)
 
CFM_API int CFM_working_entry_ask_group (tag_t entry, logical *current_group, tag_t *user)
 
CFM_API int CFM_working_entry_set_group (tag_t entry, logical current_group, tag_t user)
 
CFM_API int CFM_status_entry_ask_status (tag_t entry, tag_t *status_type)
 
CFM_API int CFM_status_entry_set_status (tag_t entry, tag_t status_type)
 
CFM_API int CFM_status_entry_ask_type (tag_t entry, int *type)
 
CFM_API int CFM_status_entry_set_type (tag_t entry, int type)
 
CFM_API int CFM_override_entry_ask_folder (tag_t entry, tag_t *folder)
 
CFM_API int CFM_override_entry_set_folder (tag_t entry, tag_t folder)
 
CFM_API int CFM_branch_entry_ask_branch (tag_t entry, tag_t *branch)
 
CFM_API int CFM_branch_entry_set_branch (tag_t entry, tag_t branch)
 
CFM_API int CFM_date_entry_ask_date (tag_t entry, logical *today, date_t *effective_date)
 
CFM_API int CFM_date_entry_set_date (tag_t entry, logical today, date_t effective_date)
 

CFM Item

CFM_API int CFM_item_ask_configured (tag_t rule, tag_t item, tag_t *configured_rev, char **how_configured)
 
CFM_API int CFM_item_ask_configured_base (tag_t rule, tag_t item, tag_t *configured_rev, char **how_configured)
 
CFM_API int CFM_item_ask_configured_nested (tag_t rule, tag_t item, tag_t *configured_rev, char **how_configured)
 
CFM_API int CFM_item_ask_how_configured (tag_t rule, tag_t item, tag_t *configured_rev, tag_t *how_configured)
 

CFM Occurrence Effectivity

CFM_API int CFM_is_occ_configured (tag_t rule, tag_t bvr, tag_t occ, logical *answer)
 
CFM_API int CFM_occ_set_effectivity (tag_t bvr, tag_t occ, tag_t eff_object)
 
CFM_API int CFM_occ_ask_effectivity (tag_t bvr, tag_t occurrence, tag_t *eff_object)
 
CFM_API int CFM_effectivity_create (const char *id, tag_t *eff_object)
 
CFM_API int CFM_effectivity_find (const char *id, tag_t *eff_object)
 
CFM_API int CFM_effectivity_ask_id (tag_t eff_object, char **id)
 
CFM_API int CFM_effectivity_set_id (tag_t eff_object, const char *id)
 
CFM_API int CFM_effectivity_ask_date_ranges (tag_t eff_object, int *n_ranges, date_t **from_dates, date_t **to_dates)
 
CFM_API int CFM_effectivity_set_date_ranges (tag_t eff_object, int n_ranges, date_t *from_dates, date_t *to_dates)
 

Detailed Description

The Configuration Management (CFM) module provides the ability to configure Items and the definition of the rules that drive that configuration.

The CFM module works with the following classes of object:

Common Return Values

CFM_invalid_tag - The rule and/or preset_rule tags are invalid.
CFM_value_not_found - No rule of that name could be found.

Macro Definition Documentation

#define CFM_entry_branch   10

Definition at line 63 of file cfm.h.

#define CFM_entry_date   3

Definition at line 56 of file cfm.h.

#define CFM_entry_end_item   8

Definition at line 61 of file cfm.h.

#define CFM_entry_group   5

Definition at line 58 of file cfm.h.

#define CFM_entry_group_item_type   9

Definition at line 62 of file cfm.h.

#define CFM_entry_latest   7

Definition at line 60 of file cfm.h.

#define CFM_entry_nested_eff   11

Definition at line 64 of file cfm.h.

#define CFM_entry_override   2

Definition at line 55 of file cfm.h.

#define CFM_entry_precise   6

Definition at line 59 of file cfm.h.

#define CFM_entry_status   1

Definition at line 54 of file cfm.h.

#define CFM_entry_unit_no   4

Definition at line 57 of file cfm.h.

#define CFM_entry_working   0

Definition at line 53 of file cfm.h.

#define CFM_latest_alpha_plus_no   3

Definition at line 83 of file cfm.h.

#define CFM_latest_alphanumeric   1

Definition at line 81 of file cfm.h.

#define CFM_latest_creation_date   0

Definition at line 80 of file cfm.h.

#define CFM_latest_numeric   2

Definition at line 82 of file cfm.h.

#define CFM_status_effective_date   1

Definition at line 72 of file cfm.h.

#define CFM_status_released_date   0

Definition at line 71 of file cfm.h.

#define CFM_status_unit_no   2

Definition at line 73 of file cfm.h.

Function Documentation

CFM_API int CFM_ask_how_configured_user_ref ( tag_t  how_configured,
tag_t user_ref 
)

'User ref' allows the caller to associate some tag value to a CFMHowConfigured record, and retrieve it again. With the example described for CFM_latest_of_latest above, the caller might store the tag of the corresponding configured occ data against each candidate CFMHowConfigured record, and retrieve the value from the 'winner' identified by CFM_latest_of_latest.

Parameters
how_configured(I) Tag of the CFMHowConfigured record
user_ref(O) Gives tag value previously stored using CFM_set_how_configured_user_ref
CFM_API int CFM_ask_rule_text ( tag_t  rule,
char **  text 
)
Deprecated:
This function was obsoleted from V7.
Parameters
rule(I)
text(OF)
CFM_API int CFM_branch_entry_ask_branch ( tag_t  entry,
tag_t branch 
)

Finds the tag of the branch for the given branch entry.

If the returned tag is NULLTAG, this indicates a "place-holding" branch, which can be used in Teamcenter Engineering UIF to allow non-privileged users to set a branch for a Revision Rule.

Returns
Parameters
entry(I) Tag of the branch entry
branch(O) Tag of the branch
CFM_API int CFM_branch_entry_set_branch ( tag_t  entry,
tag_t  branch 
)

Sets the branch for the given branch entry.

Set the branch to be NULLTAG to indicate a "place-holding" branch, which can be used in Teamcenter Engineering UIF to allow non-privileged users to set a branch for a Revision Rule.

(Whilst empty, this branch entry will have no effect on configuration.)

Returns
Parameters
entry(I) Tag of the branch entry
branch(I) Tag of the branch
CFM_API int CFM_create_intent ( const char *  name,
const char *  desc,
tag_t new_intent 
)

Create a new intent object

Parameters
name(I)
desc(I)
new_intent(O)
CFM_API int CFM_date_entry_ask_date ( tag_t  entry,
logical today,
date_t effective_date 
)
Deprecated:
Use CFM_rule_ask_date
Parameters
entry(I)
today(O)
effective_date(O)
CFM_API int CFM_date_entry_set_date ( tag_t  entry,
logical  today,
date_t  effective_date 
)
Deprecated:
Use CFM_rule_set_date
Parameters
entry(I)
today(I)
effective_date(I)
CFM_API int CFM_effectivity_ask_date_ranges ( tag_t  eff_object,
int *  n_ranges,
date_t **  from_dates,
date_t **  to_dates 
)

Gives the list of effective date ranges on the effectivity object.

Parameters
eff_object(I) Tag of the effectivity object
n_ranges(O) Number of date ranges attached to the effectivity object
from_dates(OF) n_ranges List of "from" dates for the date ranges
to_dates(OF) n_ranges List of "to" dates for the date ranges
CFM_API int CFM_effectivity_ask_id ( tag_t  eff_object,
char **  id 
)

Gives the ID of the effectivity object.

Parameters
eff_object(I) Tag of the effectivity object
id(OF) ID of the effectivity object
CFM_API int CFM_effectivity_create ( const char *  id,
tag_t eff_object 
)

Creates a new date effectivity object.

Parameters
id(I) Unique identifier for the new effectivity object
eff_object(O) Tag of the newly created effectivity object
CFM_API int CFM_effectivity_find ( const char *  id,
tag_t eff_object 
)

Finds a specified effectivity object.

Parameters
id(I) Identifier of the sought effectivity object
eff_object(O) Tag of the matching effectivity object
CFM_API int CFM_effectivity_set_date_ranges ( tag_t  eff_object,
int  n_ranges,
date_t from_dates,
date_t to_dates 
)

Sets the date ranges for the effectivity object, replacing all existing ranges on the object.

Restrictions:

Each date range range must be non-overlapping. The final "to-date" may be NULLDATE to represent an open-ended final range. No other range may be open-ended

Parameters
eff_object(I) Tag of the effectivity object
n_ranges(I) Number of date ranges to attach to the effectivity object
from_dates(I) List of "from" dates for the date ranges
to_dates(I) List of "to" dates for the date ranges
CFM_API int CFM_effectivity_set_id ( tag_t  eff_object,
const char *  id 
)

Sets the ID of the effectivity object.

Parameters
eff_object(I) Tag of the effectivity object
id(I) New ID for the effectivity object
CFM_API int CFM_entry_ask_type ( tag_t  entry,
int *  type 
)

Finds the type of the given entry.

Possible entry types are as follows:

CFM_entry_working Working entry
CFM_entry_status Status entry
CFM_entry_overrideOverride entry
CFM_entry_date Date entry
CFM_entry_unit_no Unit number entry
CFM_entry_precise Precise entry
Parameters
entry(I) Tag of the entry
type(O) Type of the entry
CFM_API int CFM_find ( const char *  name,
tag_t rule 
)

Finds the revision rule, either stored in the database or modified in the current session.

Parameters
name(I) Identifier for the rule name
rule(O) Rule found
CFM_API int CFM_free_how_configured ( tag_t  how_configured)

Frees up the memory allocated to a CFMHowConfigured record.

Parameters
how_configured(I) Tag of the CFMHowConfigured record no longer required
CFM_API int CFM_get_revision_rules ( int *  count,
tag_t **  rules 
)

Retrieves the list of all user-visible and non-suppressed Revision Rules in the database.

Returns
Parameters
count(O) Number of rule tags found
rules(OF) count User-visible and non-suppressed Revision Rules found
CFM_API int CFM_group_entry_add_entry ( tag_t  group_entry,
tag_t  entry_to_add 
)

Adds the given entry to the given group entry.

Restrictions:

Only working and status entries may be added into a group. All the entries in a group must be of the same type, i.e. all working or all status. For status entries, all must use the same criteria to decide 'latest' (release date, effective date, or effective unit number). For example, it is not possible to decide between a release date and a unit number which one is latest.

Return Values:

CFM_entry_is_not_groupable - Only working and status entries may be grouped.
CFM_entry_incompatible_w_group - New entry has different type or latest criterion from those already in the group.

Parameters
group_entry(I) Tag of the group entry
entry_to_add(I) Tag of the entry to add to the group
CFM_API int CFM_group_entry_list_entries ( tag_t  group_entry,
int *  n_entries,
tag_t **  entries 
)

Provides the list of entries in the given group entry.

Parameters
group_entry(I) Tag of the group entry
n_entries(O) Number of entries in the group
entries(OF) n_entries Ordered list of entries
CFM_API int CFM_group_entry_remove_entry ( tag_t  group_entry,
tag_t  entry_in_group 
)

Removes entry from group, entry is added back into rule. If group is left empty, it is deleted.

Return Values:

CFM_entry_not_in_group - The entry is not in the given group.

Parameters
group_entry(I) Tag of the group entry
entry_in_group(I) Tag of the entry to remove from the group
CFM_API int CFM_group_itemtype_entry_ask_itemtypes ( tag_t  entry,
int *  n_itemtypes,
char ***  itemtypes 
)

Provides the list of item types in the given group item type entry.

Parameters
entry(I) Tag of the group IT entry
n_itemtypes(O) Number of item types
itemtypes(OF) n_itemtypes List of item types
CFM_API int CFM_group_itemtype_entry_set_itemtypes ( tag_t  entry,
int  n_itemtypes,
char **  itemtypes 
)

Sets the item types of a groupp item type entry.

Parameters
entry(I) Tag of the group IT entry
n_itemtypes(I) Number of item types
itemtypes(I) n_itemtypes List of item types
CFM_API int CFM_how_configured_text ( tag_t  how_configured,
char **  text 
)

Turns a CFMHowConfigured record into the equivalent text as displayed in 'how configured' column.

Parameters
how_configured(I) Describes how the revision rule decided on a configured revision
text(OF) Text describing how the revision rule decided on a configured revision
CFM_API int CFM_is_occ_configured ( tag_t  rule,
tag_t  bvr,
tag_t  occ,
logical answer 
)

Indicates if the occurrence is configured in the context of the given revision rule.

Parameters
rule(I) Tag of the revision rule (contains configuration date)
bvr(I) Tag of the parent BOMView Revision
occ(I) Tag of the occurrence
answer(O) True if the occurrence is configured, false otherwise.
CFM_API int CFM_item_ask_configured ( tag_t  rule,
tag_t  item,
tag_t configured_rev,
char **  how_configured 
)

Finds the revision of the given item that is configured when the given revision rule is used to configure the given item. Also returns a textual representation of which entry/entries in the rule caused the particular revision to be configured.

If no revision of the item is configured by the rule, NULLTAG is returned as the configured revision.

By default, this call is not aware of nested effectivity. If you want to make it aware of nested effectivity, set the preference CFMNestedEffectivityOverride to -1.

Callers that are aware of nested effectivity should use CFM_item_ask_configured_base instead of this. Callers that cannot handle nested effectivity, but would like to try, can call CFM_item_ask_configured_nested.

Parameters
rule(I) Tag of the revision rule to use for the configuration
item(I) Tag of the item to configure
configured_rev(O) Tag of the configured revision (or NULLTAG)
how_configured(OF) An explanation of why the particular revision was configured
CFM_API int CFM_item_ask_configured_base ( tag_t  rule,
tag_t  item,
tag_t configured_rev,
char **  how_configured 
)

Finds the revision of the given item that is configured when the given revision rule is used to configure the given item. Also returns a textual representation of which entry/entries in the rule caused the particular revision to be configured.

If no revision of the item is configured by the rule, NULLTAG is returned as the configured revision.

This call should be used by clients that are aware of nested effectivity, and are generating revision rule modifiers.

Parameters
rule(I) Tag of the revision rule to use for the configuration
item(I) Tag of the item to configure
configured_rev(O) Tag of the configured revision (or NULLTAG)
how_configured(OF) An explanation of why the particular revision was configured
CFM_API int CFM_item_ask_configured_nested ( tag_t  rule,
tag_t  item,
tag_t configured_rev,
char **  how_configured 
)

Finds the revision of the given item that is configured when the given revision rule is used to configure the given item. Also returns a textual representation of which entry/entries in the rule caused the particular revision to be configured.

If no revision of the item is configured by the rule, NULLTAG is returned as the configured revision.

This call is different from CFM_item_ask_configured in that it attempts to resolve nested effectivity configuration internally.Note that in the absence of product structure this is only an approximation of the configuration. It cannot handle multiple revisions per product structure.

This call should be used by clients that cannot handle nested effectivity.

Parameters
rule(I) Tag of the revision rule to use for the configuration
item(I) Tag of the item to configure
configured_rev(O) Tag of the configured revision (or NULLTAG)
how_configured(OF) An explanation of why the particular revision was configured
CFM_API int CFM_item_ask_how_configured ( tag_t  rule,
tag_t  item,
tag_t configured_rev,
tag_t how_configured 
)

Where a revision is configured (configured_rev != NULLTAG), returns a CFMHowConfigured record which describes how the rev was configured. See description of CFM_latest_of_latest.

Note
After use you should free up the memory associated with a CFMHowConfigured record by calling CFM_free_how_configured.
Parameters
rule(I) Tag of the revision rule to use for the configuration
item(I) Tag of the item to configure
configured_rev(O) Tag of the configured revision (or NULLTAG)
how_configured(O) Describes how the revision rule decided on the configured revision
CFM_API int CFM_latest_entry_ask_type ( tag_t  entry,
int *  type 
)

Asks the configuration type of a latest entry, which specifies how 'latest' is decided.

Parameters
entry(I) Tag of the 'latest' entry
type(O) Defines the way in which 'latest' is decided: CFM_latest_creation_date, CFM_latest_alphanumeric, CFM_latest_alpha_plus_no or CFM_latest_numeric
CFM_API int CFM_latest_entry_set_type ( tag_t  entry,
int  type 
)

Sets the configuration type of a latest entry, which specifies how 'latest' is decided.

Parameters
entry(I) Tag of the 'latest' entry
type(I) Defines the way in which 'latest' is decided: CFM_latest_creation_date, CFM_latest_alphanumeric, CFM_latest_alpha_plus_no or CFM_latest_numeric
CFM_API int CFM_latest_of_latest ( tag_t  rule,
int  n_candidates,
tag_t candidates,
tag_t latest 
)

For use in conjunction with Incremental Change (IC) configuration. With IC you may find you have 'competing' states of data (e.g. several occ datas setting transform for the same occurrence). Where you have multiple such states configured, you will want to know which is 'latest'. For each configured IC revision CFM_item_ask_how_configured will have given you back a CFMHowConfigured record describing how that revision was configured. You then assemble the tags of those CFMHowConfigureds into an array, and pass them to this function, which will pass back the tag of the 'latest' one according to this rev rule.

Parameters
rule(I) Tag of the revision rule to use for the configuration
n_candidates(I) Number of candidate how configured records
candidates(I) n_candidates Array of candidate how configured records
latest(O) Points to the candidate how configured record deemed 'latest'
CFM_API int CFM_list ( int *  count,
tag_t **  rules 
)

Lists the tags of all accessible preset rules stored in the database.

Parameters
count(O) Number of rule tags found
rules(OF) count Tags of the rules found in the database
CFM_API int CFM_occ_ask_effectivity ( tag_t  bvr,
tag_t  occurrence,
tag_t eff_object 
)

Gives the date effectivity on the occurrence.

Parameters
bvr(I) Tag of the parent BOMView Revision
occurrence(I) Tag of the occurrence
eff_object(O) Tag of the effectivity object attached to the occurrence. NULLTAG if no effectivity.
CFM_API int CFM_occ_set_effectivity ( tag_t  bvr,
tag_t  occ,
tag_t  eff_object 
)

Sets the date effectivity on the occurrence.

Parameters
bvr(I) Tag of the parent BOMView Revision
occ(I) Tag of the occurrence
eff_object(I) Tag of the effectivity object containing the required date effectivity
CFM_API int CFM_override_entry_ask_folder ( tag_t  entry,
tag_t folder 
)

Finds the tag of the override folder for the given override entry. If the returned tag is NULLTAG, this indicates a "place-holding" override folder, which can be used in Teamcenter Engineering UIF to allow non-privileged users to set an override folder for a Revision Rule.

Parameters
entry(I) Tag of the override entry
folder(O) Tag of the override folder
CFM_API int CFM_override_entry_set_folder ( tag_t  entry,
tag_t  folder 
)

Sets the override folder for the given override entry.

Set the override folder to be NULLTAG to indicate a "place-holding" override folder, which can be used in Teamcenter Engineering UIF to allow non-privileged users to set an override folder for a Revision Rule. (Whilst empty, this override entry will have no effect on configuration.)

Parameters
entry(I) Tag of the override entry
folder(I) Tag of the override folder
CFM_API int CFM_rule_add_entry ( tag_t  rule,
int  type,
tag_t entry 
)

Creates a new entry of given type and adds it to the end of the list of entries in the rule.

Valid entry types are as follows:

Token Entry Type Default Settings
CFM_entry_working Working entry No user or group specified
CFM_entry_status Status entry ANY status and type
CFM_entry_latest Latest entry Type CFM_latest_creation_date
CFM_entry_overrideOverride entry No override folder specified
CFM_entry_date Date entry "Today"
CFM_entry_unit_no Unit Number entryUnit number 0
CFM_entry_end_itemEnd Item entry No end item
CFM_entry_precise Precise entry N/A
CFM_entry_branch Branch entry No branch definition specified

Restrictions:

A rule may only contain at most one of each of the last three entry types listed above. An attempt to add a second will result in an error.

Return Values:

CFM_duplicate_date_entry - Only one date entry is allowed per rule.
CFM_duplicate_unitno_entry - Only one unit number entry is allowed per rule.

Parameters
rule(I) Tag of the rule
type(I) Type of entry to add to rule
entry(O) Tag of the newly created entry
CFM_API int CFM_rule_add_intent ( tag_t  rule,
tag_t  intent 
)
Parameters
rule(I)
intent(I)
CFM_API int CFM_rule_ask_date ( tag_t  rule,
date_t date 
)

Gives the date entry of the specified Revision Rule.

Parameters
rule(I) Revision Rule
date(O) Date entry of the Revision Rule
CFM_API int CFM_rule_ask_effective_date ( tag_t  rule,
date_t date 
)
Deprecated:
This may be obsoleted, perhaps in v10. Use CFM_rule_ask_date
Parameters
rule(I)
date(O)
CFM_API int CFM_rule_ask_end_item ( tag_t  rule,
tag_t end_item 
)

Gives the end item set on the given rule.

Parameters
rule(I) The rule being queried
end_item(O) The end item used by any of the rule status entries that are configured by effective date or unit
CFM_API int CFM_rule_ask_end_item_rev ( tag_t  rule,
tag_t end_item_rev 
)
Parameters
rule(I) The rule being queried
end_item_rev(O) The end item revision used by any of the rule status entries that are configured by effective date or unit
CFM_API int CFM_rule_ask_modifier ( tag_t  rule,
tag_t modifier 
)

Returns the revision rule modifier currently in effect. This modifier can define an End Item, End Item Revision, Date or Unit Number that will override those set in the revision rule itself.

Parameters
rule(I)
modifier(O)
CFM_API int CFM_rule_ask_unit ( tag_t  rule,
int *  unit 
)
Parameters
rule(I)
unit(O)
CFM_API int CFM_rule_copy ( tag_t  rule_to_copy,
const char *  new_name,
tag_t new_rule 
)

Copies the given revision rule and all its rule entries into a new revision rule with given name.

Restrictions:

The new rule name should be unique, otherwise the rule can not be saved.

Parameters
rule_to_copy(I) Tag of the rule to copy
new_name(I) Name for the new copy
new_rule(O) Tag of the newly created copy
CFM_API int CFM_rule_create ( const char *  rule_name,
const char *  description,
tag_t new_rule 
)

Creates a revision rule with given name and description. Use the WSOM functions if you need to change the name and/or description in the future.

Restrictions:

The rule name should be unique, otherwise the rule can not be saved.

Parameters
rule_name(I) Name for the new rule
description(I) Description for the new rule
new_rule(O) Tag of the newly created rule
CFM_API int CFM_rule_delete_entry ( tag_t  rule,
tag_t  entry 
)

Removes the given entry from the given rule, and deletes the entry.

Parameters
rule(I) Tag of the rule
entry(I) Tag of the entry to delete from the rule
CFM_API int CFM_rule_delete_modifier ( tag_t  modifier)

Deletes a revision rule modifier. For performance reasons, it is recommended that you use CFM_rule_set_modifier to ensure that your revision rule isn't referencing this modifier. It shouldn't do any harm if you don't do this, but it may slow down subsequent configuration calls.

Restrictions:

Only use this function on modifiers created by a call to CFM_rule_generate_modifier. Do not use it on modifiers generated on a BOMLine. Doing so will interfere with BOM level configuration management.

Parameters
modifier(I)
CFM_API int CFM_rule_generate_end_modifier ( tag_t  rule,
int  n_items,
tag_t items,
logical  override_parent,
tag_t last_itemrev,
tag_t last_modifier 
)

Applies nested effectivity to the given set of configuration items, and returns the configured revision of hte last item and the last modifier (which does not necessarily belong to the last item). It assumes that these items represent a partial path down a product structure. Any non-configuration items in the list have no effect on the result. The last modifier can then be used to further configure sub-structure.

The override_parent flag indicates whether the first mapping is allowed to override non-null settings in the parent configuration. This flag only affects the first item in the array. This will be set to true if the first item is not the root of the product structure. It is only set to false for product structure root items when we want the values stored in the revision rule itself to take precedence over the root mapping.

Parameters
rule(I)
n_items(I)
items(I) n_items
override_parent(I)
last_itemrev(O)
last_modifier(O)
CFM_API int CFM_rule_generate_modifier ( tag_t  rule,
tag_t  itemrev,
logical  override_parent,
tag_t  old_modifier,
tag_t new_modifier 
)

Applies the revision rule to the effectivity mappings of the item revision in order to generate a revision rule modifier that can be applied to the rule using CFM_rule_set_modifier. If no mapping applies then new_modifier will be returned as NULLTAG.

The override_parent flag indicates whether the mapping is allowed to override non-null settings in the parent configuration. This is usually set to true. It is only set to false for product structure roots when we want the values stored in the revision rule itself to take precedence over the root mapping.

If old_modifier is input as NULLTAG then this function will create a new modifier for new_modifier. If old_modifier is input as non-NULLTAG then this function will update the existing modifier.

Note that if old_modifier is not NULLTAG, but new_modifier is returned as NULLTAG, then it is up to the caller to delete the old_modifier object.

Parameters
rule(I)
itemrev(I)
override_parent(I)
old_modifier(I)
new_modifier(O)
CFM_API int CFM_rule_generate_modifier_chain ( tag_t  rule,
int  n_items,
tag_t items,
logical  override_parent,
tag_t **  itemrevs,
tag_t **  modifiers 
)

Applies nested effectivity to the given set of items. It assumes that these items represent a path down a product structure. It will return the configured revision of each item and the modifier that was generated against that itemrev. This modifier can then be used to further configure sub-structure.

The override_parent flag indicates whether the first mapping is allowed to override non-null settings in the parent configuration. This flag only affects the first item in the array. This will be set to true if the first item is not the root of the product structure. It is only set to false for product structure root items when we want the values stored in the revision rule itself to take precedence over the root mapping.

Parameters
rule(I)
n_items(I)
items(I) n_items
override_parent(I)
itemrevs(OF) n_items
modifiers(OF) n_items
CFM_API int CFM_rule_group_entries ( tag_t  rule,
int  n_entries,
tag_t entries,
tag_t group_entry 
)

Groups together all the given entries (which must be in the rule) into a group entry. The group entry is placed into the rule at the former position of the first in the given list of entries.

Restrictions:

Only working and status entries may be grouped. All the entries in a group must be of the same type, i.e. all working or all status. For status entries, all must use the same criteria to decide 'latest' (release date, effective date, or effective unit number). For example, it is not possible to decide between a release date and a unit number which one is latest.

Return Values:

CFM_entry_is_not_groupable - Only working and status entries may be grouped.
CFM_entry_incompatible_w_group - All entries in the group must be the same type and use the same criterion for latest.

Parameters
rule(I) Tag of the rule
n_entries(I) Number of entries to group
entries(I) n_entries Tags of entries to group
group_entry(O) Tag of newly created group entry
CFM_API int CFM_rule_group_entries_by_itemtype ( tag_t  rule,
int  n_entries,
tag_t entries,
int  n_itemtypes,
char **  item_types,
tag_t group_entry 
)

Groups together all the given entries (which must be in the rule) into a group item type entry. The group entry is placed into the rule at the former position of the first in the given list of entries.

Parameters
rule(I) Tag of the rule
n_entries(I) Number of entries to group
entries(I) n_entries Tags of entries to group
n_itemtypes(I) Number of entries itemm types
item_types(I) item_types char array
group_entry(O) Tag of newly created group entry
CFM_API int CFM_rule_list_entries ( tag_t  rule,
int *  n_entries,
tag_t **  entries,
int **  entry_types 
)

Provides the ordered list of entries in the given rule.

Parameters
rule(I) Tag of the rule
n_entries(O) Number of entries in the rule
entries(OF) n_entries Ordered list of entries
entry_types(OF) n_entries Ordered list of entry types
CFM_API int CFM_rule_list_intents ( tag_t  rule,
int *  n_intents,
tag_t **  intents 
)
Parameters
rule(I)
n_intents(O)
intents(OF) n_intents
CFM_API int CFM_rule_move_entry_down ( tag_t  rule,
tag_t  entry 
)

Move an entry down within a rule - does nothing if at bottom already Moves the given entry down one place in the list of entries of rule. This has no effect if the

Parameters
rule(I) Tag of the rule
entry(I) Tag of the entry to move
CFM_API int CFM_rule_move_entry_up ( tag_t  rule,
tag_t  entry 
)

Moves the given entry up one place in the list of entries of rule. This has no effect if the entry is already at the head of the list.

Parameters
rule(I) Tag of the rule
entry(I) Tag of the entry to move
CFM_API int CFM_rule_reevaluate ( tag_t  rule)

Forces a re-evaluation of a rule contents. This will pick up any changes in the contents of override folders.

Note
This function is automatically invoked whenever BOM_set_window_config_rule is called, e.g. on setting revision rule in PSE.
Parameters
rule(I) Tag of the rule to reevaluate
CFM_API int CFM_rule_remove_intent ( tag_t  rule,
tag_t  intent 
)
Parameters
rule(I)
intent(I)
CFM_API int CFM_rule_replace_entry ( tag_t  rule,
tag_t  old_entry,
int  type,
tag_t new_entry 
)

Removes the given old entry from the rule and puts the new entry in its former position in the list of entries of rule. The old entry is deleted.

Parameters
rule(I) Tag of the rule
old_entry(I) Tag of the entry to be replaced
type(I) Type of replacement entry
new_entry(O) Tag of the replacement entry
CFM_API int CFM_rule_set_date ( tag_t  rule,
date_t  date 
)

Sets the date entry into the Revision Rule. If a date entry already exists with the revision rule it will be updated.

Parameters
rule(I) Revision Rule to be modified
date(I) Date entry to be set on the Revision Rule
CFM_API int CFM_rule_set_effective_date ( tag_t  rule,
date_t  date 
)
Deprecated:
This may be obsoleted, perhaps in v10. Use CFM_rule_set_date
Parameters
rule(I)
date(I)
CFM_API int CFM_rule_set_end_item ( tag_t  rule,
tag_t  end_item 
)

Sets the end item on the given rule.

Parameters
rule(I) The rule being modified
end_item(I) The end item used by any of the rule status entries that are configured by effective date or unit
CFM_API int CFM_rule_set_end_item_rev ( tag_t  rule,
tag_t  end_item_rev 
)
Parameters
rule(I) The rule being modified
end_item_rev(I) The end item revision used by any of the rule status entries that are configured by effective date or unit
CFM_API int CFM_rule_set_modifier ( tag_t  rule,
tag_t  modifier 
)

Sets the current modifier of the revision rule. This modifier can define an End Item, End Item Revision, Date or Unit Number that will override those set in the revision rule itself.

Parameters
rule(I)
modifier(I)
CFM_API int CFM_rule_set_unit ( tag_t  rule,
int  unit 
)
Parameters
rule(I)
unit(I)
CFM_API int CFM_set_how_configured_user_ref ( tag_t  how_configured,
tag_t  user_ref 
)

'User ref' allows the caller to associate some tag value to a CFMHowConfigured record, and retrieve it again. With the example described for CFM_latest_of_latest above, the caller might store the tag of the corresponding configured occ data against each candidate CFMHowConfigured record, and retrieve the value from the 'winner' identified by CFM_latest_of_latest.

Parameters
how_configured(I) Tag of the CFMHowConfigured record
user_ref(I) Tag value to be associated to the CFMHowConfigured record
CFM_API int CFM_status_entry_ask_status ( tag_t  entry,
tag_t status_type 
)

Finds the tag of the status type for the given status entry. If the returned tag is NULLTAG, this indicates "Any Release Status."

Parameters
entry(I) Tag of the status entry
status_type(O) Tag of the status type
CFM_API int CFM_status_entry_ask_type ( tag_t  entry,
int *  type 
)

Finds the type of the given status entry. Possible types of status entry are:

CFM_status_released_date Configure using the date the status was added
CFM_status_effective_date Configure using the date effectivity on the status
CFM_status_unit_no Configure using the unit no effectivity on the status
Parameters
entry(I) Tag of the status entry
type(O) Type of status entry
CFM_API int CFM_status_entry_set_status ( tag_t  entry,
tag_t  status_type 
)

Sets the status type for the given status entry.

Parameters
entry(I) Tag of the status entry
status_type(I) Tag of the status type. Set to NULLTAG to specify ANY status type.
CFM_API int CFM_status_entry_set_type ( tag_t  entry,
int  type 
)

Sets the type of the given status entry. Possible types of status entry are:

CFM_status_released_date Configure using the date the status was added
CFM_status_effective_dateConfigure using the date effectivity on the status
CFM_status_unit_no Configure using the unit no effectivity on the status

Restrictions:

Only CFM_status_released_date may be used in conjunction with "Any Release Status."

Return Values:

CFM_invalid_status_entry_type - The type given is not one of the valid configuration types.
CFM_invalid_status_date_combo - Only Released Date configuration may be used with Status = Any.

Parameters
entry(I) Tag of the status entry
type(I) Type of status entry
CFM_API int CFM_unitno_entry_ask_no ( tag_t  entry,
int *  unit_no 
)
Deprecated:
Use CFM_rule_ask_unit
Parameters
entry(I)
unit_no(O)
CFM_API int CFM_unitno_entry_set_no ( tag_t  entry,
int  unit_no 
)
Deprecated:
Use CFM_rule_set_unit
Parameters
entry(I)
unit_no(I)
CFM_API int CFM_updated ( tag_t  rule)

This will force the rule to update the BOM window using the rule (if any). This should be used if the settings associated with the rule have been changed.

Parameters
rule(I) Tag of the rule to be updated
CFM_API int CFM_working_entry_ask_group ( tag_t  entry,
logical current_group,
tag_t user 
)

Finds the group associated with the given working entry. There may be no group, in which case the current_group flag is false and the group tag is NULLTAG.

If the current_group flag is true, then the group tag should be ignored (it will be NULLTAG anyway).

Parameters
entry(I) Tag of the working entry
current_group(O) Set true if the group evaluates to the logged in group
user(O) Tag of the user
CFM_API int CFM_working_entry_ask_user ( tag_t  entry,
logical current_user,
tag_t user 
)

Finds the user associated with the given working entry. There may be no user, in which case the current_user flag is false and the user tag is NULLTAG.

If the current_user flag is true, then the user tag should be ignored (it will be NULLTAG anyway).

Parameters
entry(I) Tag of the working entry
current_user(O) Set true if the user evaluates to the logged in user
user(O) Tag of the user
CFM_API int CFM_working_entry_set_group ( tag_t  entry,
logical  current_group,
tag_t  user 
)

Sets the group associated with the given working entry. If you want not to have a group associated with the entry, then set the current_group flag to false, and the group tag to NULLTAG.

If the current_group flag is set to true, then the group tag will be ignored.

Parameters
entry(I) Tag of the working entry
current_group(I) Set true to evaluate to the logged in group
user(I) Tag of the group
CFM_API int CFM_working_entry_set_user ( tag_t  entry,
logical  current_user,
tag_t  user 
)

Sets the user associated with the given working entry. If you want not to have a user associated with the entry, then set the current_user flag to false, and the user tag to NULLTAG.

If the current_user flag is set to true, then the user tag will be ignored.

Parameters
entry(I) Tag of the working entry
current_user(I) Set true to evaluate to the logged in user
user(I) Tag of the user