vcProductNeedFeedMatch

vcProductNeedFeedMatch is created when vcProductMatcher matches a need and a feed with each other. vcProductNeedFeedMatch stores the properties of the mached need and feed, and controls the state of the match.

Properties

Name Type Access Description
State Enumeration R State of the match.   See the match state options in Product Matcher Constants.
SelectedProcessFlowInfo vcNextProcessFlowInfo R FlowInfo that was selected in the Feed-Need matching process.
MatchedNeed vcProductNeedInfo R Properties of the matched need.   After a match has been disposed, the value is None.
MatchedFeed vcProductFeedInfo R Properties of the matched feed.   After a match has been disposed, the value is None.

Methods

Name Return Type Parameters Description
tryCancelMatch None None Attempt to cancel the match. Returns true if cancelling is successful.   A match cannot be cancelled after the match has been finalized.
finalizeMatch None [vcProductNeed receivingNeed] Sets the match state to Finalized. Normally, done by the need owner in vcProductNeed.OnMatched event handler.   Optionally, can replace the MatchedNeed if receivingNeed is given.
dispose None None Disposes a completed or cancelled match, so that the vcProductNeed and vcProductFeed objects can be reused for another match.   Changes the State to Disposed and sets the values of MatchedNeed and MatchedFeed to None.   If dispose is called from within a state change event handler, disposing is delayed and will only be executed after all event handlers have been called. dispose can only be called when the State is Finalized, Cancelled, or Disposed. If the State is already Disposed, dispose does nothing.

Events

Name Parameters Description
OnStateChanged vcProductNeedFeedMatch match, Enumeration state

Triggered when the state of the match has been changed.

See the match state options in Product Matcher Constants.

OnNeedOrFeedDead vcProductNeedFeedMatch match Triggered when the value of either MatchedNeed or MatchedFeed is set to None.