Maximo auto generation of work orders - auto-generate

I am new to Maximo and trying to auto generate work orders for each asset for each month starting the first of every month so that I can forward the list to respective asset managers.
I have created job plans and preventive maintenance but I'm unable to proceed from there.
Could someone please provide me some clues or point me the direction where I could do further study?

Two steps from now, you want to turn on an instance of the PMWoGenCronTask in the Cron Task Setup application. Before you do that, though, you need to go to Organizations > PM Options and configure some of the run-time, per-site parameters for that Cron Task.
Once you have the above working, you can investigate #theDcoDer's suggestions for letting people know they have Work Orders (WOs) assigned to them and for helping them manage their work.

Related

Custom alert rules with Application Insights

Need the help of the crowd.
I'm wondering if the below monitoring scenario is possible with Application Insights.
I want to have an alert if one event occurred (on a certain entity) but another event did not follow it.
We have a job scheduling machine, we want to monitor cases in which a job creation was requested but a job was not created.
So we log everything of course, we have an event that a job was requested, and we have an event when a job was created.
And we want to be alerted if jobs were requested but was not created.
What would be the best practice? Is it even possible to AI?
Thanx!
Oh... I now found there is a way to define alerts on custom log searches.
We will give it a try and keep this post updated.
If anyone has other ideas - lets me know.

ASANA API - get only projects associated to me

when you query /projects I get every project in the organization(a-lot) ... is there anyway to just get projects that I am interested in (ie task assigned to me, mention of me, or one that I have flaged as following?)
I have also tried
users/me/projects
projects?followers=me
That's a really interesting idea. We don't currently have a way of doing that - even in the product! - in part because everyone's definition of "interesting to me" is a little different. For instance, there's no global way to look up, for a user, all the comments they're mentioned in - mentioning adds a user as a follower to the task, sure, but they might be removed from the followers list subsequently. Should projects with tasks that I hearted be included? What about projects with tasks that have comments that I hearted? Projects with tasks that I'm following, sure - but what if the last time I followed a task in that project was over a year ago, and the task I followed is long since complete? Since tasks can be in multiple projects, does it make sense to include a project that I may have never even seen, but includes a task that's also in a project I work on, and so I've touched it? It's a tricky question to get right for everyone, to be sure.
In the meantime, you can get tasks that are assigned to you in a workspace (GET /tasks?workspace=[id]&assignee=me) and then crawl all the tasks to find the projects they're in (I know, not terribly elegant).
We currently don't expose projects/tasks you're following or projects you've favorited (starred) via the API. And as far as I know there's no way to query stories/tasks you're mentioned in via the API or the app.

How do I have an action happen 24 hours after a specific date in Rails?

Im on Rails 4, I'm creating a listing/rental site where people can list things and then other people can rent them. I'm using Stripe to handle all my payments, and I have a form set up that gets the users credit card and makes them a customer when they request to book a rental. After that, the owner of the rental can view the request and confirm or deny it. If they confirm it, the user renting gets their card charged and their money goes into holding.
When a user requests a booking, they choose a pick-up and drop-off date. I would like to have an action that calls a payout from stripe to the listings owner 24 hours after the pick up date. I am not sure how to go about this, so any suggestions are great! Of course if anyone knows of any tutorials implementing such a thing that would be awesome :).
Thanks.
Couple of things you can do
delayed_job: requires a database and a running process to run scheduled jobs; You can use it on heroku as shown here
resque-scheduler: requires redis and resque and a running process to run scheduled jobs. You can use it on heroku as shown here. Use resque-web and resque-cleaner to check and handle failed jobs.
whenever: requires access to cron jobs and your own script to be setup to run every hour or every few minutes to then pickup listings that need to be processed and then process them away. You'll need to work out a good error reporting system. Doesn't run on heroku
heroku scheduler: that is all managed through heroku but essentially gives you the same capabilities as whenever.
Resque would probably be my choice, but you should know better about your domain.
Install the whenever gem and documentation is available here: https://github.com/javan/whenever
Then in config/scheduler.rb file mention your function name and defined in the model or as per requirement. It will be behave like CRON job but major difference is that it can run application internal function as well.
There are many ways of doing this.
All of which involve some sort of data store that is checked every X minutes. Within this data store you can usually set a run on time.
Checkout:
https://github.com/collectiveidea/delayed_job
or
https://github.com/mperham/sidekiq

Automatically deleting temporary storage

Not sure how to go about this problem that I have. In my website, visitors will look at my product catalogue and place orders, leaving behind their email for contact. I would like my website to automatically process their product's detailed report and store in a temporary folder for 24 hrs. The link will then be emailed to them with a one-time-password. 24hrs later I want the folder removed from my server.
I believe there are website that work similarly.
Question is: Is there anyway that I can program a script to remove folders that have reached their expiry time (24hrs in this case) since the time it was last written to? Or do I have to personally station myself at the server to delete off this folders everyday?
There is number of way to do this, you can use background process, check the expiry when user requests a report or the simplest solution - cron job. Not sure what technology do you use, but this should be a nice tutorial for PHP:
http://net.tutsplus.com/tutorials/php/managing-cron-jobs-with-php-2/
With ruby on rails you have nice cron support and a railscast explaining it:
http://railscasts.com/episodes/164-cron-in-ruby

Create a "playable demo" version of a Rails site?

It's quite common in sites- you have a "demo" version with a guest account full of data/posts/comments that you can play with, and all the data is reset every few hours so users wont spam the demo site.
I thought to have another rails environment, "mysite_demo" and use a cron job to call rake to reset it's database every X hours, and populate the seed data.
Then it hit me that all over my app I'll have to check if I'm running in "demo-mode":
For example, if the demo site has a login/register page too, a user might register, insert some data and wonder why his account is deleted after he logged in again.. so demosite shouldn't have a register option at all.
So I thought I'll make a "demo" branch of the code.. with the difference and just merge changes as I go... sounds like an overkill.
ideas?
In my application I started with a fixed demo user with an account that resets every hour. Something about that model didn't quite sit right - if there were multiple users hitting the demo at the same time you could get into some weird concurrency issues. And what if a user is in the middle of a demo and your reset the demo account? What happens?
I don't know if this model works for you but I ended up creating a brand new user account with a demo flag set in the database - I also automatically log the user in. This way the user gets to play around for as long as they like and I don't have to worry about data getting deleted/changed while a user demos my app. I run a cron job every night that deletes users with the demo flag set that are older than 24 hours.
If the demo version is running from its own database, how is it any different from the real thing? The demo site is just an instance of your product.
Just clean up the DB and redeploy the demo as needed. Is it just this simple or am I missing something?
Then it hit me that all over my app I'll have to check if I'm running in "demo-mode" (e.g, you cant register a new user in the demo) and make the site behave accordingly.
If the site is in demo, why does it matter what the users do? Anything they do will be wiped in a few hours, so they won't be able to actually do work with it.
It sounds like you are trying to handicap the site so they will pay. I don't know what your site does, but if its a host based service(web page that stores & display information) then the limited life span of the data should deter squatters.
If you website does something that can be used elsewhere, then I can see limiting it. An example might be a service that transforms media formats, or writes resumes. If the user can do something useful in the 2 hour window and walk away with it, then you might consider branching.
Why not allow the user to make an account even if it is deleted in an hour?
That allows them to see how the registration process of the script works for at least an hour, maybe give a message on the signup page that the account is only valid for an hour.
Just my thoughts
Is there any other functionality that is different in the demo version than the production environment? If it is just an issue of making the user register, you could just create a registered demo account in production, and give out the user name/password for people. Although this may not be an option depending on other business requirements.
If you are willing to use Authlogic you can take a look at this, then every X hours you can look through the database for users that start with anonymous_ and delete records that are associated with them.
Just make a separate demo site that works exactly like the production one, but the DB gets reset once an hour to clean example data. The only change you need to make is a banner across the top of every page that says its a demo. There are several ways to do it, (modify your site theme, or maybe use frames) but basically you should only have to change the code in one place, instead of throughout the site.
You could setup a new environment demo on your database.yml, with read-only privileges for the User table, and an additional demo_database. Then place some checks on your code to see if your RAILS_ENV is on DEMO.
That way, you only need to work with the same codebase and just show whatever you feel like it.
You can deploy it as a separate app with its own database to a separate domain or subdomain and then check the domain to decide what options should be available. For instance if you put it on demo.example.com you would use:
if request.domain =~ /demo/
If you use Capistrano you can set it up to update both apps when you deploy so they are in sync.

Resources