How to create a role that contains the members of a crew assigned to the current workorder - maximo

I have a communication template that currently sends an email to a single person. I would like to have the template send to a Role whose members are the members of the crew assigned to the workorder. I am not sure the best way to go about doing this.

Add a relationship from workorder to person, or find a relationship or chain of relationships, that will find all the people in the crew, then use that relationship to create a role based on a data set related to the current record.

Related

CloudKit - How to share a set of entities and allow creation of new data

I'm currently building up an app for grocery-shopping where I'd want to share a set of data (shops, products, recipes and tags) within the family.
Let's say I have Entities called Shop, Product, Recipe and Tag. How can I establish an relation in CloudKit, that allows each invited user to edit shops, add products or read recipes?
I want to share all known information inside something kind of a "family store" but it seems like there's no documentation on how to do this using CloudKit and CoreData, so I hope for someone who already build sharing of a set of entities between multiple users.
I suggest setting up a Family entity in CloudKit, alongside your Shop, Product, Recipe, and Tag entities. The Family would be the parent entity, and the others would have a CKReference property that points to a Family record.
In order to coordinate sharing records between users, you could look at CKShare which is the mechanism Apple provides for sharing records from the private database (documentation).
In your case, you would share Family records between users. As long as the other records are set to have the Family record as its parent, they will automatically be shared along with the Family record's CKShare.
There is a tutorial that I like on Medium that walks through how it works which should apply pretty well to what you are trying to do: https://medium.com/#adammillers/cksharing-step-by-step-33800c8950d2
The whole workflow is more than you can shove into a Stack Overflow answer. I hope this helps get you started.

can we update the value of relationship

I want to know whether we can update the parameter of relationship.
like food delivery, if I am having a relationship of a person and I am inheriting person and making a relationship of it
If you want to create a runtime relationship of any transactions, participants and assets than you can use the Factory(Runtime API) method. Using Factory you can create instances of Resource. you can follow this link.
I hope you get your answer.

How to represent the instantiation of a type/class to represent a particular entity

Here is an example:
I have the generic type called "Account". I wish to use this account to represent multiple business entities:
1. Customer
2. Client
3. Company
I wish to use the Account type for the above 3 entities (as they are all types of accounts in my system - where the type is an attribute of the Account). How would I represent this relationship?
The only relationship you've described is that 'type' is an attribute of the Account. If Customer, Client, or Company are not strong enough entities on their own to deserve their own box on the Domain diagram, then you are done. In that case, you can include a note box associated with Account and say "Examples of values for the Type field: Customer, Client, Company, etc.".
If that is not strong enough, you may think about creating an AccountType class which have as sub-classes Customer, Client, Company. In that case you would draw an association from Account to AccountType, which replaces the need for the 'Type" attribute.
When I get a chance, I'll draw examples and post links to them.
You can model the template class (Account) and then bind it to create three different classes using the association link and the bind stereotype on the link, as you can see here, under the "Class Template" title.
I believe the diagram I would use to communicate these relationships between diffrent objects is the "Collaboration" diagram, as what the relationships show is how the different objects are instantiated (Account is instantiated as Customer, Client and Company) and how they (the instances) would interact with each other

Root Entity reference to another root

I'm facing a typical DDD problem. It must be very basic. I have an order and customer.
A customer can create multiple orders. Customer is the root of its own aggregate. Order is the root of its own aggregate. But when a customer creates an order, we display some portion of the customer information on the order. Should Order aggregate hold reference to customer?
When it holds it then when the Order Repository gets the order, we are able to retrieve some portion of customer information as well for display. But when we involve the order in a transaction, customer also gets into it which is creating problem if the customer is also getting updated at the same time. Please advise guys ! My gut feeling says I MUST not hold reference to customer from order.
Question 2: (NEW)
Can I get and hold a reference to the Customer (from Customer Repository) for a given Order while creating an Order (using Order Factory) and safely save the Order (without updating the Customer inside in anyway, Customer is there only for information/query?) without creating contention if the same Customer is getting modified else where? Lets assume NHibernate as ORM.
A simple answer will be that you hold the ID of the customer or, if needed for your domain some ValueObject with a minimal set of information about the customer ( ID, Name ).
A more complex answer is to think about Bounded Context. See Eric Evans's presentation where he wishes he had put the BC chapter as the first chapter in the book.
The idea is that in your Customer Management Bounded Context, your Customer entity can be the AR of the Customer Aggregate and the Orders can be entities in the Customer Aggregate. In the Billing Bounded Context you can have an Order AR with a Customer entity inside.

Roles scheme for college course management and grading system

I've got a system that allows classroom instructors and graders to log in and manage classes and grade papers. A user can be both an instructor and a grader, and can be so for particular semesters. Other users, like students, are also bound to this semester scheme. Still others, like administrators, have accounts that don't run by semester.
When someone is no longer a grader or instructor, she still needs to be able to access past grading or classroom records, albeit with fewer privileges (view only).
I've thought about implementing a roles table with a semester as a part of the key, but that doesn't apply to all users. I've also thought about keeping the semester data separate from the roles, but making roles like "PastGrader" and "PastInstructor" to cover those people who need to have access to past information but should not be allowed to participate in this semester.
What is the optimal data model/roles model for this application?
I think you're on the right track. I would keep the semester out of the roles table, but use them together where needed.
Here is what I did recently that will also work in your scenario:
Create a FunctionalRole table that has the following columns:
FunctionalRoleId, FunctionalRoleName
These roles will be like jobs. Teacher, Grader, etc.
Add another table called FeatureRole, with the following columns:
FeatureRoleId, FeatureRoleName
These roles will be for specific features in the application. GradePapers, ViewPapers, etc.
Then create a third table... call it RoleMember, that has these columns:
FunctionalRoleId, FeatureRoleId
That way, the admin can assign roles more simply by the job and all of the feature roles will automatically be assigned.
And like I said, keep the semester information separate.
Gabriel
I think that you need an additional entity to help you out. You clearly have the domain object of a CLASS to represent a specific class (ie: Composition II is a class). You also clearly have a domain object for PARTICIPANT to represent the people that attend the class. I think you have already identified those two.
Next, you need a domain object to represent a specific semester/timeslot/classroom where a CLASS will be held. Let’s call that domain object a CLASSSCHEDULE. You will need a relationship from CLASS to CLASSSCHEDULE to show what topic will be taught in that room during that semester.
Now you need a domain object to represent how a PRATICIPANT interacts with a CLASSSCHEDULE. We can call this domain object an ENROLLMENT. The ENROLLMENT object is where you put your privileges for the PARTICIPANT. The PARTICIPANT is ENROLLed in the CLASSSCHEDULE as a learner or a grader. Your role is attached to the ENROLLMENT object. In this way, each PARTICIPANT will have a different privilege level for each CLASSSCHEDULE that they are involved with.

Resources