OK, so welcome back that we'll see quite a simple example of a pattern collecting information.
Now we're going to talk about a little bit of a more complex pattern that on the very surface looks
quite simple.
But when you start digging and it becomes a little bit complicated and it's related very much to status
functions we talked about in the philosophical section.
So it's called the party rule party.
And I'm going to do the same thing here.
So I'm going to walk through this is how they are typically described, how patterns typically describe
I'm going to use data structure for how I go through it.
So the on the very high level, we have persons or other types of entities that are actually playing
roles in in concrete situations.
So how do you handle that?
So the name of the pattern is party rule.
Yeah, the intent is guidelines for how to use party and rule concepts together.
The motivation is that parties and roles are common, recurring problems in concept models and in has
its roots.
As I said, in the state, its function declarations as described in the foundation section, the applicability
that it could be used in all situations where the concerns need to be separated clearly.
So not only persons can play roles as well.
So an organization can play a role or a system can play a role or almost anything can play a role.
So that is kind of taking on a function in some concrete scenario and the consequences for using it
that you get very much increased ability for, for example, handing authorization roles and and structuring
legal frameworks about who can do what in different situations and creating accountability and traceability
in in businesses and so on.
So it's very, very important usually in a business, and it leads to generally that increased and modify
ability of the system.
However, it could also increase the complexity.
So again, that is something you need to take into account how there's many credits here.
Alan Silverstone, Paul Wangu, Mango's, Pangalos Erixon and a couple of other people talked about
the party role concert.
OK, so let's start with the structure and the participants in the structure.
So we have a context type and roles are defined for a specific context type.
Then we have a concrete context and a priority is assigned a role within that concrete context.
Right.
And then we can have a role, connection rule saying that maybe some priorities when they are participating
in a concrete context could play some roles in conjunction, but might not be able to play other roles
in conjunction or actually across contexts as well.
So there is a connection of role assignment.
So that is regulated by this rule.
So that's the same same type of same type of structure that we found in the load unit when we discussed
the load.
Your example, if you remember that.
So already here you see this becomes a little bit abstract and hard to grasp.
So let's take a concrete example of the court and the trial to see how this actually fits in in the
real world scenario.
So yet again, I'm going to use an object model to describe the concrete scenarios.
So you see how the conceptual structures work.
OK, so let's take this step by step so we have a context type we call into court.
And within that context, there's a role defined.
Call a judge on another roll call prosecutor.
Right.
There is the rule saying that you cannot be the judge and the prosecutor in the same context.
Then there is a trial, which is another context type that is wrong within the court, and though you
have a defendant, you have jury members and you have trial judge and you also have other rules as well.
But here are three examples.
Then there could be a connection rule saying that you could be the trial judge and the court judge at
the same time.
That's fine.
But you cannot be the defendant and the trial judge at the same time, or you cannot be the jury member
and the defendant at the same time.
So quite a logical step to assigning roles to parties.
So let's say now that we have this context type and role judge, now we can say that we have a specific
context, which is New York state court.
And within that we have a priority called Judy.
And she's the the judge within the specific court.
So there is a New York State judge, which is called Judy.
Right.
Then we have a trial.
So here's our trial, A1, let's say it's called.
And that's of the type trial, which is the context type.
And there's also a role we saw in that context type, which is called a trial judge.
And it happens to be that since she couldn't.
Can you d actually also the trial judge on this trial?
So there's also the role, the Simon connection here, saying that it's fine for Judy to be assigned
both the judge role in the New York state court and be assigned the judge, the trial judge in this
specific trial.
So this connection is fine according to this rule.
And then we have a defendant, which is also role within a trial.
And there is a defendant called Charles, and he has then the defendant assignment rule in this trial.
So now we're hooking up specific parties to the roles that we define for the contexts.
So maybe that's correct.
But maybe you think it's too complicated.
So here's an example of how a pattern could be quite complex, even if it's correct.
And maybe it needs to be that complex and maybe even more things added on to it to actually reflect
the what you're trying to say here.
But let's make it a little bit simpler and see how that would look like.
So let's say that we get rid of the rules and the connections and say just that we have a context and
we have our own assignment within the context for the party.
And you have a role and you're assigned to that in a context.
So using that more simplified version, you can say that you have a role called you judge, in the context
of a New York state court.
And Judy is assigned that role in that context.
And you have another role called trial judge.
And jury is actually assigned that role in a specific context of a trial.
And you have another defendant role and Charles is the defendant in this specific trial.
So here's a simplified version of it.
But that might be too simple.
So then you don't see anything of the as I showed you the connections between the different assignments
and any rules there are, there needs to be thought of when you assign people different roles.
So here you see maybe a simplified version, but maybe that is too simple.
So maybe you look like a hybrid version.
So you can see that you can probably play around with different complexities here in different patterns.
So let's say that we then putting in something called a roll, we have this is the basic structure of
the simplified one.
But maybe we would like to see a little bit more about this declarative role that they're playing.
I'm not putting in the rules again here, but I'm adding another different take on this that you can
actually have declarative rules and contextualize rules, sorry, declarative roles and contextualized
roles.
And in this example, if we take the Ozbek version of that, we can say that we have a judge, which
is a role and we have Judy and she's playing this.
So she's been assigned a declarative role during a period.
So during the period of one year here, she's playing the role of a judge.
And then we might have a context, which is a specific trial.
And she's the trial judge during this concepts.
What I removed here is kind of the second context of the court, so to speak.
But I'm including that she's actually could be assigned a judge role outside a specific trial.
So and then I could add that I have Charles, who's the defendant, and the defendant has a role in
the trial as well.
So the the the a little bit hybrid version here is saying that, judge, you're a judge both in a court
on a declarative basis and you're a judge in a trial on that specific basis.
So that is kind of combining the two different judge rules I define in the more complex case.
So that's a hybrid, a little bit more complex, but not as complex as the first one, but more complex
than a simple one.
And that is not the end goal.
To be complex here is more like that is more flexible.
How flexible it could be for you.
OK, related patterns.
So the party role pattern is, of course, related to the party pattern as well.
We are not going through here, but you can read more more about that in some books about patents.
Very good.
That was the second a little bit more complicated, thorough analysis of how to use the pattern, the
party role pattern.
That's next year.
We're going to be talking about how process models and conceptual models are related.
See you there.